Small fixes to lazy constraints

This commit is contained in:
2020-09-24 14:30:29 -05:00
parent 0fe6aab98f
commit ba96338d2d
7 changed files with 58 additions and 39 deletions

View File

@@ -110,7 +110,7 @@ def test_internal_solver():
# New constraint should affect solution and should be listed in
# constraint ids
assert solver.get_constraints_ids() == ["eq_capacity", "cut"]
assert solver.get_constraint_ids() == ["eq_capacity", "cut"]
stats = solver.solve()
assert stats["Lower bound"] == 1030.0
@@ -120,7 +120,7 @@ def test_internal_solver():
# New constraint should no longer affect solution and should no longer
# be listed in constraint ids
assert solver.get_constraints_ids() == ["eq_capacity"]
assert solver.get_constraint_ids() == ["eq_capacity"]
stats = solver.solve()
assert stats["Lower bound"] == 1183.0
@@ -131,7 +131,7 @@ def test_internal_solver():
solver.add_constraint(cobj)
# Constraint should affect solution again
assert solver.get_constraints_ids() == ["eq_capacity", "cut"]
assert solver.get_constraint_ids() == ["eq_capacity", "cut"]
stats = solver.solve()
assert stats["Lower bound"] == 1030.0