mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 04:03:39 +00:00
start using lar_solver::is_feasible() (#5697)
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
7758b519bc
commit
9b4f3a7075
|
@ -1529,7 +1529,7 @@ public:
|
||||||
IF_VERBOSE(12, verbose_stream() << "final-check " << lp().get_status() << "\n");
|
IF_VERBOSE(12, verbose_stream() << "final-check " << lp().get_status() << "\n");
|
||||||
lbool is_sat = l_true;
|
lbool is_sat = l_true;
|
||||||
SASSERT(lp().ax_is_correct());
|
SASSERT(lp().ax_is_correct());
|
||||||
if (lp().get_status() != lp::lp_status::OPTIMAL || lp().has_changed_columns()) {
|
if (!lp().is_feasible() || lp().has_changed_columns()) {
|
||||||
is_sat = make_feasible();
|
is_sat = make_feasible();
|
||||||
}
|
}
|
||||||
final_check_status st = FC_DONE;
|
final_check_status st = FC_DONE;
|
||||||
|
@ -3083,21 +3083,14 @@ public:
|
||||||
TRACE("pcs", tout << lp().constraints(););
|
TRACE("pcs", tout << lp().constraints(););
|
||||||
auto status = lp().find_feasible_solution();
|
auto status = lp().find_feasible_solution();
|
||||||
TRACE("arith_verbose", display(tout););
|
TRACE("arith_verbose", display(tout););
|
||||||
switch (status) {
|
if (lp().is_feasible())
|
||||||
case lp::lp_status::INFEASIBLE:
|
|
||||||
return l_false;
|
|
||||||
case lp::lp_status::FEASIBLE:
|
|
||||||
case lp::lp_status::OPTIMAL:
|
|
||||||
// SASSERT(lp().all_constraints_hold());
|
|
||||||
return l_true;
|
return l_true;
|
||||||
case lp::lp_status::TIME_EXHAUSTED:
|
if (status == lp::lp_status::INFEASIBLE)
|
||||||
|
return l_false;
|
||||||
default:
|
TRACE("arith", tout << "status treated as inconclusive: " << status << "\n";);
|
||||||
TRACE("arith", tout << "status treated as inconclusive: " << status << "\n";);
|
|
||||||
// TENTATIVE_UNBOUNDED, UNBOUNDED, TENTATIVE_DUAL_UNBOUNDED, DUAL_UNBOUNDED,
|
// TENTATIVE_UNBOUNDED, UNBOUNDED, TENTATIVE_DUAL_UNBOUNDED, DUAL_UNBOUNDED,
|
||||||
// FLOATING_POINT_ERROR, TIME_EXAUSTED, EMPTY, UNSTABLE
|
// FLOATING_POINT_ERROR, TIME_EXAUSTED, EMPTY, UNSTABLE
|
||||||
return l_undef;
|
return l_undef;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lp::explanation m_explanation;
|
lp::explanation m_explanation;
|
||||||
|
@ -3467,7 +3460,7 @@ public:
|
||||||
st = lp::lp_status::UNBOUNDED;
|
st = lp::lp_status::UNBOUNDED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (lp().get_status() != lp::lp_status::OPTIMAL || lp().has_changed_columns())
|
if (!lp().is_feasible() || lp().has_changed_columns())
|
||||||
make_feasible();
|
make_feasible();
|
||||||
|
|
||||||
vi = get_lpvar(v);
|
vi = get_lpvar(v);
|
||||||
|
|
Loading…
Reference in a new issue