mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
Fix failing test
This commit is contained in:
@@ -131,6 +131,10 @@ end
|
||||
@error "JuMPSolver: set_threads not implemented"
|
||||
end
|
||||
|
||||
function set_branching_priorities(self, priorities)
|
||||
@error "JuMPSolver: set_branching_priorities not implemented"
|
||||
end
|
||||
|
||||
function set_time_limit(self, time_limit)
|
||||
JuMP.set_time_limit_sec(self.model, time_limit)
|
||||
end
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
# Copyright (C) 2020, UChicago Argonne, LLC. All rights reserved.
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
from miplearn import LearningSolver
|
||||
from miplearn.problems.stab import MaxWeightStableSetInstance
|
||||
from miplearn.problems.stab import MaxWeightStableSetGenerator
|
||||
import networkx as nx
|
||||
import numpy as np
|
||||
from miplearn import LearningSolver
|
||||
from miplearn.problems.stab import MaxWeightStableSetInstance
|
||||
from scipy.stats import uniform, randint
|
||||
|
||||
|
||||
@@ -16,7 +15,7 @@ def test_stab():
|
||||
instance = MaxWeightStableSetInstance(graph, weights)
|
||||
solver = LearningSolver()
|
||||
solver.solve(instance)
|
||||
assert instance.model.OBJ() == 2.
|
||||
assert instance.lower_bound == 2.
|
||||
|
||||
|
||||
def test_stab_generator_fixed_graph():
|
||||
|
||||
Reference in New Issue
Block a user