mirror of
https://github.com/Z3Prover/z3
synced 2025-06-22 22:03:39 +00:00
resurrect infinitesimals from maximization function #5720
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d7c7fbb8f1
commit
130a0c4aa0
1 changed files with 4 additions and 1 deletions
|
@ -259,6 +259,9 @@ namespace opt {
|
||||||
if (!m_models[i])
|
if (!m_models[i])
|
||||||
m_models.set(i, m_last_model.get());
|
m_models.set(i, m_last_model.get());
|
||||||
|
|
||||||
|
if (val > m_objective_values[i])
|
||||||
|
m_objective_values[i] = val;
|
||||||
|
|
||||||
//
|
//
|
||||||
// retrieve value of objective from current model and update
|
// retrieve value of objective from current model and update
|
||||||
// current optimal.
|
// current optimal.
|
||||||
|
@ -267,7 +270,7 @@ namespace opt {
|
||||||
rational r;
|
rational r;
|
||||||
expr_ref value = (*m_last_model)(m_objective_terms.get(i));
|
expr_ref value = (*m_last_model)(m_objective_terms.get(i));
|
||||||
if (arith_util(m).is_numeral(value, r) && r > m_objective_values[i])
|
if (arith_util(m).is_numeral(value, r) && r > m_objective_values[i])
|
||||||
m_objective_values[i] = inf_eps(r);
|
m_objective_values[i] = inf_eps(r);
|
||||||
};
|
};
|
||||||
|
|
||||||
update_objective();
|
update_objective();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue