C++ Reference: class Prober

Note: This documentation is automatically generated.

Method
num_new_binary_clauses

Return type: int

num_new_literals_fixed

Return type: int

Statistics. They are reset each time ProbleBooleanVariables() is called. Note however that we do not reset them on a call to ProbeOneVariable().

ProbeBooleanVariables

Return type: bool

Arguments: double deterministic_time_limit

Fixes Booleans variables to true/false and see what is propagated. This can: - Fix some Boolean variables (if we reach a conflict while probing). - Infer new direct implications. We add them directly to the BinaryImplicationGraph and they can later be used to detect equivalent literals, expand at most ones clique, etc... - Tighten the bounds of integer variables. If we probe the two possible values of a Boolean (b=0 and b=1), we get for each integer variables two propagated domain D_0 and D_1. The level zero domain can then be intersected with D_0 U D_1. This can restrict the lower/upper bounds of a variable, but it can also create holes in the domain! This will detect common cases like an integer variable in [0, 10] that actually only take two values [0] or [10] depending on one Boolean. Returns false if the problem was proved INFEASIBLE during probing. TODO(user): For now we process the Boolean in their natural order, this is not the most efficient. TODO(user): This might generate a lot of new direct implications. We might not want to add them directly to the BinaryImplicationGraph and could instead use them directly to detect equivalent literal like in ProbeAndFindEquivalentLiteral(). The situation is not clear. TODO(user): More generally, we might want to register any literal => bound in the IntegerEncoder. This would allow to remember them and use them in other part of the solver (cuts, lifting, ...). TODO(user): Rename to include Integer in the name and distinguish better from FailedLiteralProbing() below.

ProbeBooleanVariables

Return type: bool

Arguments: double deterministic_time_limit, absl::Span<const BooleanVariable> bool_vars

Same as above method except it probes only on the variables given in 'bool_vars'.

ProbeOneVariable

Return type: bool

Arguments: BooleanVariable b

Prober

Return type: explicit

Arguments: Model* model

SetPropagationCallback

Return type: void

Arguments: std::function<void(Literal decision)> f

Register a callback that will be called on each "propagation". One can inspect the VariablesAssignment to see what are the inferred literals.