3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-29 09:28:45 +00:00

working on upper bound optimziation

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2013-11-03 14:54:42 -08:00
parent e5698119d7
commit c0de1e34ac
17 changed files with 343 additions and 125 deletions

View file

@ -525,7 +525,7 @@ namespace smt {
}
// k += new_a_ij * lower_bound(x_j).get_rational();
k.addmul(new_a_ij, lower_bound(x_j).get_rational());
lower(x_j)->push_justification(ante, numeral::zero(), proofs_enabled());
lower(x_j)->push_justification(ante, numeral::zero(), coeffs_enabled());
}
else {
SASSERT(at_upper(x_j));
@ -541,7 +541,7 @@ namespace smt {
}
// k += new_a_ij * upper_bound(x_j).get_rational();
k.addmul(new_a_ij, upper_bound(x_j).get_rational());
upper(x_j)->push_justification(ante, numeral::zero(), proofs_enabled());
upper(x_j)->push_justification(ante, numeral::zero(), coeffs_enabled());
}
pol.push_back(row_entry(new_a_ij, x_j));
}
@ -566,7 +566,7 @@ namespace smt {
}
// k += new_a_ij * lower_bound(x_j).get_rational();
k.addmul(new_a_ij, lower_bound(x_j).get_rational());
lower(x_j)->push_justification(ante, numeral::zero(), proofs_enabled());
lower(x_j)->push_justification(ante, numeral::zero(), coeffs_enabled());
}
else {
SASSERT(at_upper(x_j));
@ -579,7 +579,7 @@ namespace smt {
new_a_ij.neg(); // the upper terms are inverted
// k += new_a_ij * upper_bound(x_j).get_rational();
k.addmul(new_a_ij, upper_bound(x_j).get_rational());
upper(x_j)->push_justification(ante, numeral::zero(), proofs_enabled());
upper(x_j)->push_justification(ante, numeral::zero(), coeffs_enabled());
}
TRACE("gomory_cut_detail", tout << "new_a_ij: " << new_a_ij << "\n";);
pol.push_back(row_entry(new_a_ij, x_j));
@ -772,8 +772,8 @@ namespace smt {
// u += ncoeff * lower_bound(v).get_rational();
u.addmul(ncoeff, lower_bound(v).get_rational());
}
lower(v)->push_justification(ante, numeral::zero(), proofs_enabled());
upper(v)->push_justification(ante, numeral::zero(), proofs_enabled());
lower(v)->push_justification(ante, numeral::zero(), coeffs_enabled());
upper(v)->push_justification(ante, numeral::zero(), coeffs_enabled());
}
else if (gcds.is_zero()) {
gcds = abs_ncoeff;