diff --git a/src/math/lp/gomory.cpp b/src/math/lp/gomory.cpp index cefd9767f..167725d31 100644 --- a/src/math/lp/gomory.cpp +++ b/src/math/lp/gomory.cpp @@ -410,12 +410,11 @@ public: return all_of(t, [&](auto ci) { return ci.coeff().is_small(); }); }; auto add_cut = [&](cut_result const& cr) { - u_dependency* dep = cr.dep; lp::lpvar term_index = lra.add_term(cr.t.coeffs_as_vector(), UINT_MAX); term_index = lra.map_term_index_to_column_index(term_index); lra.update_column_type_and_bound(term_index, lp::lconstraint_kind::GE, - lia.m_k, dep); + cr.k, cr.dep); }; auto _check_feasible = [&](void) { lra.find_feasible_solution(); diff --git a/src/math/lp/lar_solver.h b/src/math/lp/lar_solver.h index a01a66a38..91d506e1e 100644 --- a/src/math/lp/lar_solver.h +++ b/src/math/lp/lar_solver.h @@ -562,7 +562,9 @@ public: std::ostream& print_implied_bound(const implied_bound& be, std::ostream& out) const; std::ostream& print_values(std::ostream& out) const; std::ostream& display(std::ostream& out) const; - + std::ostream& display_constraint(std::ostream& out, constraint_index ci) const { + return m_constraints.display(out, ci); + } bool init_model() const; mpq from_model_in_impq_to_mpq(const impq& v) const { return v.x + m_delta * v.y; } mpq get_value(column_index const& j) const;