mirror of
https://github.com/Z3Prover/z3
synced 2025-07-19 10:52:02 +00:00
Merge branch 'master' of https://github.com/z3prover/z3
This commit is contained in:
commit
1efbc25b3b
13 changed files with 73 additions and 32 deletions
|
@ -125,7 +125,7 @@ namespace opt {
|
|||
m_solver(nullptr),
|
||||
m_pareto1(false),
|
||||
m_box_index(UINT_MAX),
|
||||
m_optsmt(m),
|
||||
m_optsmt(m, *this),
|
||||
m_scoped_state(m),
|
||||
m_fm(alloc(generic_model_converter, m, "opt")),
|
||||
m_model_fixed(),
|
||||
|
@ -357,6 +357,17 @@ namespace opt {
|
|||
}
|
||||
}
|
||||
|
||||
void context::set_model(model_ref& m) {
|
||||
m_model = m;
|
||||
opt_params optp(m_params);
|
||||
if (optp.dump_models()) {
|
||||
model_ref md = m->copy();
|
||||
fix_model(md);
|
||||
std::cout << *md << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void context::get_model_core(model_ref& mdl) {
|
||||
mdl = m_model;
|
||||
fix_model(mdl);
|
||||
|
@ -1062,6 +1073,9 @@ namespace opt {
|
|||
|
||||
|
||||
void context::model_updated(model* md) {
|
||||
model_ref mdl = md;
|
||||
set_model(mdl);
|
||||
#if 0
|
||||
opt_params optp(m_params);
|
||||
symbol prefix = optp.solution_prefix();
|
||||
if (prefix == symbol::null || prefix == symbol("")) return;
|
||||
|
@ -1074,6 +1088,7 @@ namespace opt {
|
|||
out << *mdl;
|
||||
out.close();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue