Skip to content

Commit

Permalink
take the coefficient from cut_result, not lia
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
  • Loading branch information
levnach committed Jan 11, 2024
1 parent 1b39290 commit 2ac866a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/math/lp/gomory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,12 +410,11 @@ struct create_cut {
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();
Expand Down
4 changes: 3 additions & 1 deletion src/math/lp/lar_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,9 @@ class lar_solver : public column_namer {
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;
Expand Down

0 comments on commit 2ac866a

Please sign in to comment.