Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <integer_expr.h>
Public Member Functions | |
LevelZeroEquality (IntegerVariable target, const std::vector< IntegerVariable > &vars, const std::vector< IntegerValue > &coeffs, Model *model) | |
bool | Propagate () final |
This assumes target = SUM_i coeffs[i] * vars[i], and detects that the target must be of the form (a*X + b).
This propagator is quite specific and runs only at level zero. For now, this is mainly used for the objective variable. As we fix terms with high objective coefficient, it is possible the only terms left have a common divisor. This close app2-2.mps in less than a second instead of running forever to prove the optimal (in single thread).
Definition at line 177 of file integer_expr.h.
operations_research::sat::LevelZeroEquality::LevelZeroEquality | ( | IntegerVariable | target, |
const std::vector< IntegerVariable > & | vars, | ||
const std::vector< IntegerValue > & | coeffs, | ||
Model * | model ) |
Definition at line 487 of file integer_expr.cc.
|
finalvirtual |
Implements operations_research::sat::PropagatorInterface.
Definition at line 511 of file integer_expr.cc.