-
Notifications
You must be signed in to change notification settings - Fork 559
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
Closed
Closed
+165
−33
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…might be contraversial because I also dropped the part of the implementation that only does it for integer variables
emma58
commented
Oct 27, 2025
Comment on lines
+314
to
+321
| # 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) |
Contributor
Author
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?
Contributor
Author
|
This is a duplicate of #3698, so I'm closing it. We can steal tests from here though. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: