Skip to content

Commit d4008eb

Browse files
committed
fix
1 parent f43b60b commit d4008eb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

ortools/sat/presolve_context.cc

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2106,15 +2106,11 @@ bool PresolveContext::CanonicalizeObjective(bool simplify_domain) {
21062106
// Detect if the objective domain do not limit the "optimal" objective value.
21072107
// If this is true, then we can apply any reduction that reduce the objective
21082108
// value without any issues.
2109-
//
2110-
// TODO(user): implement an incremental method to update this flag.
2111-
const bool objective_domain_was_constraining =
2112-
objective_domain_is_constraining_;
21132109
objective_domain_is_constraining_ =
2114-
!implied_domain.IsIncludedIn(objective_domain_);
2115-
if (objective_domain_was_constraining && !objective_domain_is_constraining_) {
2116-
UpdateRuleStats("objective: domain is no longer constraining");
2117-
}
2110+
!implied_domain
2111+
.IntersectionWith(Domain(std::numeric_limits<int64_t>::min(),
2112+
objective_domain_.Max()))
2113+
.IsIncludedIn(objective_domain_);
21182114
return true;
21192115
}
21202116

0 commit comments

Comments
 (0)