C++ Reference: class DomainDeductions

This documentation is automatically generated.

If for each literal of a clause, we can infer a domain on an integer variable, then we know that this variable domain is included in the union of such infered domains.

This allows to propagate "element" like constraints encoded as enforced linear relations, and other more general reasoning.

TODO(user): Also use these "deductions" in the solver directly. This is done in good MIP solvers, and we should exploit them more.

TODO(user): Also propagate implicit clauses (lit, not(lit)). Maybe merge that with probing code? it might be costly to store all deduction done by probing though, but I think this is what MIP solver do.
Method
AddDeduction

Return type: void

Arguments: int literal_ref, int var, Domain domain

Adds the fact that enforcement => var \in domain. Important: No need to store any deductions where the domain is a superset of the current variable domain.

MarkProcessingAsDoneForNow

Return type: void

Optimization. Any following ProcessClause() will be fast if no more deduction touching that clause are added.

NumDeductions

Return type: int

Returns the total number of "deductions" stored by this class.