From 041458f97ae81d52884e4993c042b594c0297552 Mon Sep 17 00:00:00 2001 From: Lev Date: Tue, 18 Sep 2018 14:42:32 -0700 Subject: [PATCH] fixes the +- bug in gomory cut Signed-off-by: Lev --- src/util/lp/gomory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/lp/gomory.cpp b/src/util/lp/gomory.cpp index e1e6fc0ea..377c6125c 100644 --- a/src/util/lp/gomory.cpp +++ b/src/util/lp/gomory.cpp @@ -71,7 +71,7 @@ class gomory::imp { else { lp_assert(at_upper(j)); // the upper terms are inverted: therefore we have the minus - new_a = - (fj < f0? fj / f0 : (- one_minus_fj / one_minus_f0)); + new_a = fj < f0? (- fj / f0 ) : (one_minus_fj / one_minus_f0); m_k.addmul(new_a, upper_bound(j).x); m_ex.push_justification(column_upper_bound_constraint(j), new_a); }