Extract value of LP relaxation

This commit is contained in:
2020-02-22 22:40:54 -06:00
parent 10ad8e0a9e
commit b60afab5ef
2 changed files with 15 additions and 4 deletions

View File

@@ -27,14 +27,15 @@ def test_solver():
assert instance.solution["x"][1] == 0.0
assert instance.solution["x"][2] == 1.0
assert instance.solution["x"][3] == 1.0
assert instance.lower_bound == 1183.0
assert instance.upper_bound == 1183.0
assert round(instance.lp_solution["x"][0], 3) == 1.000
assert round(instance.lp_solution["x"][1], 3) == 0.923
assert round(instance.lp_solution["x"][2], 3) == 1.000
assert round(instance.lp_solution["x"][3], 3) == 0.000
assert round(instance.lp_value, 3) == 1287.923
assert instance.lower_bound == 1183.0
assert instance.upper_bound == 1183.0
solver.fit()
solver.solve(instance)