Convert MIPSolveStats into dataclass

This commit is contained in:
2021-04-11 09:10:14 -05:00
parent 2bc1e21f8e
commit bd78518c1f
11 changed files with 71 additions and 69 deletions

View File

@@ -16,7 +16,7 @@ def test_stab() -> None:
instance = MaxWeightStableSetInstance(graph, weights)
solver = LearningSolver()
stats = solver.solve(instance)
assert stats["Lower bound"] == 2.0
assert stats["mip_lower_bound"] == 2.0
def test_stab_generator_fixed_graph() -> None:

View File

@@ -47,8 +47,8 @@ def test_instance() -> None:
assert solution["x[(1, 2)]"] == 1.0
assert solution["x[(1, 3)]"] == 0.0
assert solution["x[(2, 3)]"] == 1.0
assert stats["Lower bound"] == 4.0
assert stats["Upper bound"] == 4.0
assert stats["mip_lower_bound"] == 4.0
assert stats["mip_upper_bound"] == 4.0
def test_subtour() -> None: