File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -690,6 +690,12 @@ def solve(model):
690690 solver = model .solver
691691 solver_manager = model .solver_manager
692692 else :
693+ # If we need warm start switch the solver to our augmented version that supports warm starting
694+ if model .options .warm_start is not None or model .options .save_warm_start :
695+ if model .options .solver != "gurobi" :
696+ raise NotImplementedError ("Warm start functionality requires --solver gurobi" )
697+ model .options .solver = "gurobi_aug"
698+
693699 if model .options .warm_start is not None :
694700 # Method 1 (dual simplex) is required since it supports warm starting.
695701 model .options .solver_method = 1
@@ -745,12 +751,6 @@ def solve(model):
745751 if model .options .warm_start_mip is not None or model .options .warm_start is not None :
746752 solver_args ["warmstart" ] = True
747753
748- # If we need warm start switch the solver to our augmented version that supports warm starting
749- if model .options .warm_start is not None or model .options .save_warm_start :
750- if model .options .solver != "gurobi" :
751- raise NotImplementedError ("Warm start functionality requires --solver gurobi" )
752- model .options .solver = "gurobi_aug"
753-
754754 if model .options .warm_start is not None :
755755 solver_args ["read_warm_start" ] = os .path .join (model .options .warm_start , "outputs" , "warm_start.pickle" )
756756
You can’t perform that action at this time.
0 commit comments