3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

fix objective value regression in simplex maximation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-11-01 12:45:26 -07:00
parent 736d43c084
commit 2a907ea52a
3 changed files with 14 additions and 5 deletions

View file

@ -979,6 +979,9 @@ namespace smt {
template<typename Ext>
bool theory_arith<Ext>::maximize(theory_var v) {
bool r = max_min(v, true);
if (!r && at_upper(v)) {
m_objective_value = get_value(v);
}
return r || at_upper(v);
}