3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

resurrect infinitesimals from maximization function #5720

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2022-01-06 08:34:45 -08:00
parent d7c7fbb8f1
commit 130a0c4aa0

View file

@ -259,6 +259,9 @@ namespace opt {
if (!m_models[i])
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
// current optimal.
@ -267,7 +270,7 @@ namespace opt {
rational r;
expr_ref value = (*m_last_model)(m_objective_terms.get(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();