From 317e16d471dec155eebf2e30afc4176ce4878520 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Thu, 7 Jan 2021 11:03:02 -0600 Subject: [PATCH] ConvertTight: Don't take any action on constraints with negative slack --- miplearn/components/steps/convert_tight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miplearn/components/steps/convert_tight.py b/miplearn/components/steps/convert_tight.py index 7adc84d..9466ffd 100644 --- a/miplearn/components/steps/convert_tight.py +++ b/miplearn/components/steps/convert_tight.py @@ -113,7 +113,7 @@ class ConvertTightIneqsIntoEqsStep(Component): continue if category not in y: y[category] = [] - if slack <= self.slack_tolerance: + if 0 <= slack <= self.slack_tolerance: y[category] += [[1]] else: y[category] += [[0]]