3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00
* cleaner API for explanation

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* remove an unnecessery check

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>

* expl

Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
Lev Nachmanson 2020-05-24 17:06:39 -07:00 committed by GitHub
parent d6ad371934
commit 97b480ded3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 38 deletions

View file

@ -67,7 +67,7 @@ struct gomory_test {
}
k.addmul(new_a, lower_bound(x_j).x); // is it a faster operation than
// k += lower_bound(x_j).x * new_a;
expl.add_with_coeff(column_lower_bound_constraint(x_j), new_a);
expl.add_pair(column_lower_bound_constraint(x_j), new_a);
}
else {
lp_assert(at_upper(x_j));
@ -79,7 +79,7 @@ struct gomory_test {
new_a = a / (mpq(1) - f_0);
}
k.addmul(new_a, upper_bound(x_j).x); // k += upper_bound(x_j).x * new_a;
expl.add_with_coeff(column_upper_bound_constraint(x_j), new_a);
expl.add_pair(column_upper_bound_constraint(x_j), new_a);
}
TRACE("gomory_cut_detail_real", tout << a << "*v" << x_j << " k: " << k << "\n";);
pol.add_monomial(new_a, x_j);
@ -107,7 +107,7 @@ struct gomory_test {
new_a = (1 - f_j) / f_0;
}
k.addmul(new_a, lower_bound(x_j).x);
expl.add_with_coeff(column_lower_bound_constraint(x_j), new_a);
expl.add_pair(column_lower_bound_constraint(x_j), new_a);
}
else {
lp_assert(at_upper(x_j));
@ -119,7 +119,7 @@ struct gomory_test {
}
new_a.neg(); // the upper terms are inverted
k.addmul(new_a, upper_bound(x_j).x);
expl.add_with_coeff(column_upper_bound_constraint(x_j), new_a);
expl.add_pair(column_upper_bound_constraint(x_j), new_a);
}
TRACE("gomory_cut_detail", tout << "new_a: " << new_a << " k: " << k << "\n";);
t.add_monomial(new_a, x_j);