mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Make _compute_gap static
This commit is contained in:
@@ -76,7 +76,8 @@ class BenchmarkRunner:
|
|||||||
for (solver_name, solver) in self.solvers.items():
|
for (solver_name, solver) in self.solvers.items():
|
||||||
solver.fit(training_instances)
|
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
|
# 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:
|
if lb is None or ub is None or lb * ub < 0:
|
||||||
return 1.0
|
return 1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user