We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1de64ad commit af83b96Copy full SHA for af83b96
1 file changed
ortools/sat/cp_model_presolve.cc
@@ -3088,8 +3088,10 @@ bool CpModelPresolver::PresolveSmallLinear(ConstraintProto* ct) {
3088
bool CpModelPresolver::PresolveDiophantine(ConstraintProto* ct) {
3089
if (ct->constraint_case() != ConstraintProto::kLinear) return false;
3090
if (ct->linear().vars().size() <= 1) return false;
3091
-
3092
if (context_->ModelIsUnsat()) return false;
+ // The transformation can add extra variables, and creates duplicate solutions
3093
+ // when enumerate_all_solutions is true.
3094
+ if (context_->params().enumerate_all_solutions()) return false;
3095
3096
const LinearConstraintProto& linear_constraint = ct->linear();
3097
if (linear_constraint.domain_size() != 2) return false;
0 commit comments