From 36061d5a1498f090846ac094474c73fccd59d609 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Tue, 19 Jan 2021 22:32:29 -0600 Subject: [PATCH] Make _compute_gap static --- miplearn/benchmark.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miplearn/benchmark.py b/miplearn/benchmark.py index 63464e0..3013395 100644 --- a/miplearn/benchmark.py +++ b/miplearn/benchmark.py @@ -76,7 +76,8 @@ class BenchmarkRunner: for (solver_name, solver) in self.solvers.items(): solver.fit(training_instances) - def _compute_gap(self, ub, lb): + @staticmethod + def _compute_gap(ub, lb): # solver did not find a solution and/or bound, use maximum gap possible if lb is None or ub is None or lb * ub < 0: return 1.0