3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-08-28 12:28:33 -03:00
parent 2e6908bd9e
commit 20dc59e02d
3 changed files with 5 additions and 7 deletions

View file

@ -199,7 +199,6 @@ namespace opt {
m_s->maximize_objective(obj_index, bound);
m_s->get_model(m_model);
SASSERT(m_model);
m_s->get_labels(m_labels);
inf_eps obj = m_s->saved_objective_value(obj_index);
update_lower_lex(obj_index, obj, is_maximize);
if (!is_int || !m_lower[obj_index].is_finite()) {
@ -374,7 +373,8 @@ namespace opt {
m_s->maximize_objective(i, tmp);
m_lower[i] = m_s->saved_objective_value(i);
}
m_best_model = m_model;
m_s->get_labels(m_labels);
m_context.set_model(m_model);
}
}
@ -525,7 +525,6 @@ namespace opt {
m_s->maximize_objective(obj_index, bound);
m_s->get_model(m_model);
m_s->get_labels(m_labels);
inf_eps obj = m_s->saved_objective_value(obj_index);
update_lower_lex(obj_index, obj, is_maximize);
TRACE("opt", tout << "strengthen bound: " << bound << "\n";);
@ -590,7 +589,7 @@ namespace opt {
}
void optsmt::get_model(model_ref& mdl, svector<symbol> & labels) {
mdl = m_model.get();
mdl = m_best_model.get();
labels = m_labels;
}

View file

@ -39,7 +39,7 @@ namespace opt {
expr_ref_vector m_lower_fmls;
svector<smt::theory_var> m_vars;
symbol m_optsmt_engine;
model_ref m_model;
model_ref m_model, m_best_model;
svector<symbol> m_labels;
sref_vector<model> m_models;
public: