mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
switch models for multiple box objectives. Feature request at codeplex issue 194, George Karpenov. Usage model is same as Pareto fronts you call check-sat multiple times until retrieving unsat
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
This commit is contained in:
parent
52619b9dbb
commit
f8d04118d8
6 changed files with 40 additions and 5 deletions
|
@ -219,9 +219,13 @@ namespace opt {
|
|||
}
|
||||
m_objective_values[i] = val;
|
||||
|
||||
TRACE("opt", { model_ref mdl; tout << m_objective_values[i] << "\n";
|
||||
model_ref mdl;
|
||||
get_model(mdl);
|
||||
m_models.set(i, mdl.get());
|
||||
|
||||
TRACE("opt", { tout << m_objective_values[i] << "\n";
|
||||
tout << blocker << "\n";
|
||||
get_model(mdl); model_smt2_pp(tout << "update model:\n", m, *mdl, 0); });
|
||||
model_smt2_pp(tout << "update model:\n", m, *mdl, 0); });
|
||||
}
|
||||
|
||||
void opt_solver::decrement_value(unsigned i, inf_eps& val) {
|
||||
|
@ -288,6 +292,7 @@ namespace opt {
|
|||
m_objective_values.push_back(inf_eps(rational(-1), inf_rational()));
|
||||
m_objective_sorts.push_back(m.get_sort(term));
|
||||
m_valid_objectives.push_back(true);
|
||||
m_models.push_back(0);
|
||||
return v;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue