Open andrewlee94 opened 4 years ago
The other option is to use cbc
or glpk
as the default mip solver.
@qtothec That would still require the user to install those solvers (which is admittedly not hard, but still an extra dependency).
As Pyomo is an optimization modeling framework, I am somewhat partial to having the default approach be optimization-based. That said, I think it would be a good PR to change the default solver to None
, and then inside select_tear_mip
if it is None
, then search through (gurobi
,cplex
,xpress
,cbc
,gplk
) and select the first one that is available.
@jsiirola I happen to agree on your point about Pyomo being an optimisation tool. Following on from your idea about searching a list of solvers, would it be possible to have the final option be a fall back to the heuristic approach (probably with a warning message)?
@jsiirola @andrewlee94 I think we should default to the heuristic. (my opinion).
@andrewlee94, I am less keen to automatically change the method: the solution the user gets shouldn't be too dependent on the MIP solver, but switching from MIP to Heuristic will change things. I think I would propose throwing a more informative error message if tear_solver
was None and none of the MIP solvers that we looked for are available.
@carldlaird, to clarify, do you think the default for the SD tool in Pyomo should be a heuristic, or do you think that the IDAES default use of the SD tool should be in heuristic mode?
An IDAES user brought this to my attention, and I thought that it would be worth raising for discussion.
When using the sequential decomposition tool to determine tear streams in a network, if the user does not set the
options.select_tear_method
argument, the tool defaults to using the MIP approach which requires CPLEX. In cases where a user does not have CPLEX, then they receive the obvious error that it could not be found (traceback at end).It strikes me that the heuristic approach would be a safer option to use as the default, as it does not rely on an external solver dependency. For novice users, this would work out-of-the-box without them needing to know about the deeper options (and not give the impression that they need an MILP solver). At the very least, the error message the user gets back needs to let them know that there are alternatives to using CPLEX that they can use (the error message received implies you need CPLEX to use the SD tool).