mirror of
https://github.com/Z3Prover/z3
synced 2026-02-18 14:44:21 +00:00
parent
eb56ac48b0
commit
cb5fb390bc
2 changed files with 6 additions and 1 deletions
|
|
@ -458,6 +458,7 @@ namespace opt {
|
||||||
|
|
||||||
void context::set_model(model_ref& m) {
|
void context::set_model(model_ref& m) {
|
||||||
m_model = m;
|
m_model = m;
|
||||||
|
m_model_available = true;
|
||||||
opt_params optp(m_params);
|
opt_params optp(m_params);
|
||||||
symbol prefix = optp.solution_prefix();
|
symbol prefix = optp.solution_prefix();
|
||||||
bool model2console = optp.dump_models();
|
bool model2console = optp.dump_models();
|
||||||
|
|
@ -490,6 +491,8 @@ namespace opt {
|
||||||
|
|
||||||
|
|
||||||
void context::get_model_core(model_ref& mdl) {
|
void context::get_model_core(model_ref& mdl) {
|
||||||
|
if (!m_model_available)
|
||||||
|
throw default_exception("model is not available");
|
||||||
mdl = m_model;
|
mdl = m_model;
|
||||||
CTRACE(opt, mdl, tout << *mdl;);
|
CTRACE(opt, mdl, tout << *mdl;);
|
||||||
fix_model(mdl);
|
fix_model(mdl);
|
||||||
|
|
@ -1730,6 +1733,7 @@ namespace opt {
|
||||||
m_model.reset();
|
m_model.reset();
|
||||||
m_model_fixed.reset();
|
m_model_fixed.reset();
|
||||||
m_core.reset();
|
m_core.reset();
|
||||||
|
m_model_available = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::set_pareto(pareto_base* p) {
|
void context::set_pareto(pareto_base* p) {
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,7 @@ namespace opt {
|
||||||
scoped_state m_scoped_state;
|
scoped_state m_scoped_state;
|
||||||
vector<objective> m_objectives;
|
vector<objective> m_objectives;
|
||||||
model_ref m_model;
|
model_ref m_model;
|
||||||
|
bool m_model_available = false;
|
||||||
model_converter_ref m_model_converter;
|
model_converter_ref m_model_converter;
|
||||||
generic_model_converter_ref m_fm;
|
generic_model_converter_ref m_fm;
|
||||||
sref_vector<model> m_model_fixed;
|
sref_vector<model> m_model_fixed;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue