File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ There are two solver interfaces that you should know about: `gurobi` and `gurobi
2929
3030In theory ` gurobi_direct ` should be faster and more efficient however in practice we find that that's not the case. As
3131such we recommend using ` gurobi ` and all our defaults do so. If someone has the time they could profile ` gurobi_direct `
32- to improve performance at which point we could make ` gurobi_direct ` the default.
32+ to improve performance at which point we could make ` gurobi_direct ` the default (and enable ` --save-warm-start ` by default, see below) .
3333
3434The ` gurobi ` interface has the added advantage of separating Gurobi and Pyomo into separate threads. This means that
3535while Gurobi is solving and Pyomo is idle, the operating system can automatically move Pyomo's memory usage
@@ -56,9 +56,7 @@ Current solution* refers to the solution you are trying to find while using the
5656 slower since the solver will need to first run crossover before warm starting.
5757
5858- Our implementation of warm starting only works if your previous solution has an ` outputs/warm_start.pickle `
59- file. This file is generated when you use ` --save-warm-start ` . The ` --recommended ` flag includes
60- ` --save-warm-start ` but the ` --recommended-fast ` does not (since warm starting from a solution that did not crossover
61- is generally inefficient).
59+ file. This file is only generated when you use ` --save-warm-start ` .
6260
6361- ` --save-warm-start ` and ` --warm-start ` both use an extension of the ` gurobi_direct ` solver interface which is
6462 generally slower than the ` gurobi ` solver interface (see section above).
Original file line number Diff line number Diff line change @@ -778,8 +778,6 @@ def parse_recommended_args(args):
778778 solver_options_string = "BarHomogeneous=1 FeasibilityTol=1e-5"
779779 if options .recommended_fast :
780780 solver_options_string += " crossover=0"
781- else :
782- args = ["--save-warm-start" ] + args
783781 args = ["--solver-options-string" , solver_options_string ] + args
784782 if options .recommended_debug :
785783 args = ["--keepfiles" , "--tempdir" , "temp" , "--symbolic-solver-labels" ] + args
@@ -881,7 +879,7 @@ def solve(model):
881879 else :
882880 # If we need warm start switch the solver to our augmented version that supports warm starting
883881 if model .options .warm_start is not None or model .options .save_warm_start :
884- if model .options .solver != "gurobi" :
882+ if model .options .solver not in ( "gurobi" , "gurobi_direct" ) :
885883 raise NotImplementedError (
886884 "Warm start functionality requires --solver gurobi"
887885 )
You can’t perform that action at this time.
0 commit comments