[CP-SAT] revisit cut code; add new API to MaxBoundedSubsetSum

This commit is contained in:
Laurent Perron
2023-06-06 13:14:57 +02:00
parent 0bbca8fe44
commit 7ff7fe8a56
10 changed files with 525 additions and 188 deletions

View File

@@ -824,7 +824,7 @@ bool ProductPropagator::CanonicalizeCases() {
p_.GreaterOrEqual(0), {a_.GreaterOrEqual(0), b_.GreaterOrEqual(0)});
}
// Otherwise, make sure p is non-negative or accros zero.
// Otherwise, make sure p is non-negative or across zero.
if (integer_trail_->UpperBound(p_) <= 0) {
if (integer_trail_->LowerBound(a_) < 0) {
DCHECK_GT(integer_trail_->UpperBound(a_), 0);