3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-06 17:44:08 +00:00
This commit is contained in:
Nikolaj Bjorner 2022-10-28 14:12:28 -07:00
parent 91cdc082c4
commit 0e651eee04

View file

@ -287,7 +287,9 @@ namespace opt {
bool ok = bound_value(i, val);
if (l_true != m_context.check(0, nullptr))
return false;
m_context.get_model(m_last_model);
m_context.get_model(m_last_model);
if (!m_last_model)
return false;
update_objective();
return ok;
};
@ -299,7 +301,9 @@ namespace opt {
TRACE("opt", tout << "updated\n";);
m_last_model = nullptr;
m_context.get_model(m_last_model);
if (!has_shared || val == current_objective_value(i))
if (!m_last_model)
return false;
else if (!has_shared || val == current_objective_value(i))
m_models.set(i, m_last_model.get());
else if (!check_bound())
return false;