3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-20 04:43:39 +00:00
This commit is contained in:
Nikolaj Bjorner 2021-06-07 11:41:35 -07:00
parent a60295020b
commit c1ab7987f6

View file

@ -378,6 +378,7 @@ namespace opt {
}
else if ((value == lub_val && r.m_type == opt::t_lt) ||
(is_pos && value < lub_val) ||
(!is_pos && value > lub_val)) {
m_above.push_back(bound_row_index);
lub_val = value;
@ -794,7 +795,7 @@ namespace opt {
}
std::ostream& model_based_opt::display(std::ostream& out, row const& r) {
out << (r.m_alive?"+":"-") << " ";
out << (r.m_alive?"a":"d") << " ";
display(out, r.m_vars, r.m_coeff);
if (r.m_type == opt::t_mod) {
out << r.m_type << " " << r.m_mod << " = 0; value: " << r.m_value << "\n";
@ -1193,6 +1194,8 @@ namespace opt {
if (ty == t_lt) {
SASSERT(compute_def);
m_rows[row_id1].m_coeff += a;
m_rows[row_id1].m_type = t_le;
m_rows[row_id1].m_value += a;
}
if (m_var2is_int[x] && !a.is_one()) {
row& r1 = m_rows[row_id1];
@ -1208,7 +1211,8 @@ namespace opt {
if (!visited.contains(row_id2)) {
visited.insert(row_id2);
b = get_coefficient(row_id2, x);
if (!b.is_zero()) {
if (b.is_zero())
continue;
row& dst = m_rows[row_id2];
switch (dst.m_type) {
case t_eq:
@ -1223,7 +1227,6 @@ namespace opt {
}
}
}
}
def result;
if (compute_def) {
result = def(m_rows[row_id1], x);