@@ -1641,12 +1641,12 @@ namespace lp {
1641
1641
var_index lar_solver::add_term (const vector<std::pair<mpq, var_index>>& coeffs, unsigned ext_i) {
1642
1642
TRACE (" lar_solver_terms" , print_linear_combination_of_column_indices_only (coeffs, tout) << " , ext_i =" << ext_i << " \n " ;);
1643
1643
SASSERT (!m_var_register.external_is_used (ext_i));
1644
- m_term_register.add_var (ext_i, term_is_int (coeffs));
1645
- lp_assert (all_vars_are_registered (coeffs));
1646
- if (strategy_is_undecided ())
1647
- return add_term_undecided (coeffs);
1644
+ SASSERT (all_vars_are_registered (coeffs));
1648
1645
lar_term* t = new lar_term (coeffs);
1649
1646
subst_known_terms (t);
1647
+ m_term_register.add_var (ext_i, term_is_int (t));
1648
+ if (strategy_is_undecided ())
1649
+ return add_term_undecided (coeffs);
1650
1650
push_term (t);
1651
1651
SASSERT (m_terms.size () == m_term_register.size ());
1652
1652
unsigned adjusted_term_index = m_terms.size () - 1 ;
@@ -1938,10 +1938,11 @@ namespace lp {
1938
1938
tout << std::endl;
1939
1939
}
1940
1940
});
1941
+ mpq rs = adjust_bound_for_int (j, kind, right_side);
1941
1942
if (column_has_upper_bound (j))
1942
- update_column_type_and_bound_with_ub (j, kind, right_side , dep);
1943
+ update_column_type_and_bound_with_ub (j, kind, rs , dep);
1943
1944
else
1944
- update_column_type_and_bound_with_no_ub (j, kind, right_side , dep);
1945
+ update_column_type_and_bound_with_no_ub (j, kind, rs , dep);
1945
1946
1946
1947
if (is_base (j) && column_is_fixed (j))
1947
1948
m_fixed_base_var_set.insert (j);
0 commit comments