Skip to content

Commit

Permalink
fix a bug in polarity
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 10, 2024
1 parent 75005d9 commit 2ca1187
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/math/lp/gomory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,12 @@ struct create_cut {
}
if (is_real(j))
real_case_in_gomory_cut(- p.coeff(), j);
else if (!p.coeff().is_int()) {
m_fj = fractional_part(-p.coeff());
m_one_minus_fj = 1 - m_fj;
int_case_in_gomory_cut(j);
else {
if (!p.coeff().is_int()) {
m_fj = fractional_part(-p.coeff());
m_one_minus_fj = 1 - m_fj;
int_case_in_gomory_cut(j);
}
if (p.coeff().is_pos()) {
if (at_lower(j))
set_polarity(1);
Expand Down

0 comments on commit 2ca1187

Please sign in to comment.