From 7dbcb931b32eb9d7257f3105e2d5874979a1d6d8 Mon Sep 17 00:00:00 2001 From: John Forrest Date: Mon, 23 Oct 2023 17:24:23 +0100 Subject: [PATCH] fix for bad cut --- src/CglTwomir/CglTwomir.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CglTwomir/CglTwomir.cpp b/src/CglTwomir/CglTwomir.cpp index 8fa74b0a..080d4da3 100644 --- a/src/CglTwomir/CglTwomir.cpp +++ b/src/CglTwomir/CglTwomir.cpp @@ -1618,6 +1618,11 @@ DGG_generateCutsFromBase( DGG_constraint_t *orig_base, if (orig_base->sense == 'L') return 0; if (orig_base->nz == 0) return 0; +#define CGL_TWOMIR_LARGE_RHS 1.0e10 +#ifdef CGL_TWOMIR_LARGE_RHS + if (fabs(orig_base->rhs) > CGL_TWOMIR_LARGE_RHS ) + return 0; +#endif rval = DGG_transformConstraint(data, &x, &rc, &isint, orig_base); double frac = frac_part(orig_base->rhs); //printf ("frac = %.7f, r %.7f, fr %.7f\n", frac, orig_base->rhs, floor(orig_base->rhs));