3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-07 06:33:23 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-04-24 13:27:41 -07:00
parent af5e7a1c48
commit a19e469cc2
3 changed files with 19 additions and 13 deletions

View file

@ -321,7 +321,8 @@ namespace opt {
is_sat = m_s->check_sat(1,vars);
if (is_sat == l_true) {
disj.reset();
m_s->maximize_objectives(disj);
if (!m_s->maximize_objectives1(disj))
return l_undef;
m_s->get_model(m_model);
m_s->get_labels(m_labels);
for (unsigned i = 0; i < ors.size(); ++i) {
@ -395,7 +396,8 @@ namespace opt {
expr_ref_vector disj(m);
m_s->get_model(m_model);
m_s->get_labels(m_labels);
m_s->maximize_objectives(disj);
if (!m_s->maximize_objectives1(disj))
return expr_ref(m.mk_true(), m);
set_max(m_lower, m_s->get_objective_values(), disj);
TRACE("opt", model_pp(tout << m_lower << "\n", *m_model););
IF_VERBOSE(2, verbose_stream() << "(optsmt.lower " << m_lower << ")\n";);