-
Couldn't load subscription status.
- Fork 560
contrib.solver: Gurobi warm start option #3774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…might be contraversial because I also dropped the part of the implementation that only does it for integer variables
| # elif config.warm_start_integer_vars: | ||
| # for ( | ||
| # pyomo_var_id, | ||
| # gurobi_var, | ||
| # ) in self._pyomo_var_to_solver_var_map.items(): | ||
| # pyomo_var = self._vars[pyomo_var_id][0] | ||
| # if pyomo_var.is_integer() and pyomo_var.value is not None: | ||
| # self.set_var_attr(pyomo_var, 'Start', pyomo_var.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking we could do this in all the interfaces if we want a separate option for just warm starting integer vars, but dunno if we need to add the complexity?
|
This is a duplicate of #3698, so I'm closing it. We can steal tests from here though. |
Fixes # .
Summary/Motivation:
The only Gurobi interface in the solver rewrite that was supporting warm starting was
gurobi_persistent. This PR changes the option name towarm_start(fromuse_mipstart) and changes the behavior to pass any variable with non-Nonevalue as part of the warm start. It then adds an implementation of this option ingurobi_directandgurobi_direct_minlp. I'm open to being argued with--my thinking is that this is simple and allows the user control over integer/not warm starting since they can change variable values. But maybe that isn't the best for persistent since that comes with some overhead?Changes proposed in this PR:
teeignoring being given a loggerLegal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: