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

@@ -255,5 +255,5 @@ def test_usage() -> None:
solver.solve(instance)
solver.fit([instance])
stats = solver.solve(instance)
assert stats["Lower bound"] == stats["Objective: Predicted lower bound"]
assert stats["Upper bound"] == stats["Objective: Predicted upper bound"]
assert stats["mip_lower_bound"] == stats["Objective: Predicted lower bound"]
assert stats["mip_upper_bound"] == stats["Objective: Predicted upper bound"]

View File

@@ -221,7 +221,7 @@ def test_usage() -> None:
stats = solver.solve(instance)
assert stats["Primal: Free"] == 0
assert stats["Primal: One"] + stats["Primal: Zero"] == 10
assert stats["Lower bound"] == stats["Warm start value"]
assert stats["mip_lower_bound"] == stats["mip_warm_start_value"]
def test_evaluate() -> None: