mirror of
https://github.com/Z3Prover/z3
synced 2025-07-25 21:57:00 +00:00
Skip lower bound assertions for unbounded objectives
This commit is contained in:
parent
1c0442ea31
commit
a737639790
1 changed files with 4 additions and 2 deletions
|
@ -291,8 +291,10 @@ namespace opt {
|
||||||
m_lower[i] = mid;
|
m_lower[i] = mid;
|
||||||
m_upper[i] = mid;
|
m_upper[i] = mid;
|
||||||
TRACE("opt", tout << "set lower bound of "; display_objective(tout, i) << " to: " << mid << "\n";
|
TRACE("opt", tout << "set lower bound of "; display_objective(tout, i) << " to: " << mid << "\n";
|
||||||
tout << get_lower(i) << ":" << get_upper(i) << "\n";);
|
tout << get_lower(i) << ":" << get_upper(i) << "\n";);
|
||||||
m_s->assert_expr(m_s->mk_ge(i, mid));
|
// Only assert bounds for bounded objectives
|
||||||
|
if (mid.get_infinity().is_zero())
|
||||||
|
m_s->assert_expr(m_s->mk_ge(i, mid));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostream& optsmt::display_objective(std::ostream& out, unsigned i) const {
|
std::ostream& optsmt::display_objective(std::ostream& out, unsigned i) const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue