Skip to content

Commit

Permalink
correctly process cancellation in gomory cuts
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Nachmanson <[email protected]>
  • Loading branch information
levnach committed Sep 19, 2024
1 parent b99c4a4 commit 342dccd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/math/lp/gomory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ struct create_cut {
has_small_cut = true;
add_cut(cc.m_t, cc.m_k, cc.m_dep);
if (lia.settings().get_cancel_flag())
return lia_move::undef;
return lia_move::cancelled;
}

if (big_cuts.size()) {
Expand All @@ -544,6 +544,9 @@ struct create_cut {

if (!_check_feasible())
return lia_move::conflict;

if (lra.get_status() == lp_status::CANCELLED)
return lia_move::cancelled;

if (!lia.has_inf_int())
return lia_move::sat;
Expand Down
3 changes: 2 additions & 1 deletion src/math/lp/lia_move.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ namespace lp {
conflict,
continue_with_check,
undef,
unsat
unsat,
cancelled
};
inline std::string lia_move_to_string(lia_move m) {
switch (m) {
Expand Down

0 comments on commit 342dccd

Please sign in to comment.