mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 17:38:51 -06:00
Add test for InternalSolver.fix
This commit is contained in:
@@ -50,6 +50,18 @@ def test_internal_solver_warm_starts():
|
|||||||
stats = solver.solve(tee=True)
|
stats = solver.solve(tee=True)
|
||||||
assert stats["Warm start value"] is None
|
assert stats["Warm start value"] is None
|
||||||
|
|
||||||
|
solver.fix({
|
||||||
|
"x": {
|
||||||
|
0: 1.0,
|
||||||
|
1: 0.0,
|
||||||
|
2: 0.0,
|
||||||
|
3: 1.0,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
stats = solver.solve(tee=True)
|
||||||
|
assert stats["Lower bound"] == 725.0
|
||||||
|
assert stats["Upper bound"] == 725.0
|
||||||
|
|
||||||
|
|
||||||
def test_internal_solver():
|
def test_internal_solver():
|
||||||
for solver in [GurobiSolver(), CPLEXSolver()]:
|
for solver in [GurobiSolver(), CPLEXSolver()]:
|
||||||
|
|||||||
Reference in New Issue
Block a user