[CP-SAT] improve processing of hints; fix bug with median_value heuristic; misc cleanup

This commit is contained in:
Laurent Perron
2022-11-15 16:47:05 +01:00
parent 75ef9c611a
commit 1ca305fa1c
4 changed files with 123 additions and 62 deletions

View File

@@ -795,7 +795,7 @@ bool ProductPropagator::PropagateWhenAllNonNegative() {
const IntegerValue min_p = integer_trail_->LowerBound(p_);
const IntegerValue max_p = integer_trail_->UpperBound(p_);
const IntegerValue prod(CapProd(max_a.value(), min_b.value()));
if (prod > max_p && min_b != 0) {
if (prod > max_p) {
if (!integer_trail_->SafeEnqueue(a.LowerOrEqual(FloorRatio(max_p, min_b)),
{integer_trail_->LowerBoundAsLiteral(b),
integer_trail_->UpperBoundAsLiteral(p_),