mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
roll back in maximize_term if the integrality is broken
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
f21b60a6e1
commit
cf0952c232
4 changed files with 27 additions and 4 deletions
|
@ -3548,6 +3548,9 @@ public:
|
|||
lp::impq term_max;
|
||||
lp::lp_status st;
|
||||
lpvar vi = 0;
|
||||
if (has_int()) {
|
||||
lp().backup_x();
|
||||
}
|
||||
if (!can_get_bound(v)) {
|
||||
TRACE("arith", tout << "cannot get bound for v" << v << "\n";);
|
||||
st = lp::lp_status::UNBOUNDED;
|
||||
|
@ -3558,6 +3561,11 @@ public:
|
|||
else {
|
||||
vi = get_lpvar(v);
|
||||
st = lp().maximize_term(vi, term_max);
|
||||
if (has_int() && lp().has_inf_int()) {
|
||||
st = lp::lp_status::FEASIBLE;
|
||||
lp().restore_x();
|
||||
}
|
||||
|
||||
}
|
||||
switch (st) {
|
||||
case lp::lp_status::OPTIMAL: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue