-
Notifications
You must be signed in to change notification settings - Fork 533
Add gurobi_direct
implementation to contrib.solver
#3225
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
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3225 +/- ##
==========================================
+ Coverage 88.40% 88.41% +0.01%
==========================================
Files 847 849 +2
Lines 95285 95585 +300
==========================================
+ Hits 84232 84511 +279
- Misses 11053 11074 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
if repn.c.shape[0]: | ||
gurobi_model.setAttr('ObjCon', repn.c_offset[0]) | ||
gurobi_model.setAttr('ModelSense', int(repn.objectives[0].sense)) | ||
# gurobi_model.update() |
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.
Leftover line?
Fixes # .
This PR builds on (and includes) PR #3224
Summary/Motivation:
This provides a implementation of the
gurobi_direct
solver for the newcontrib.solver
package. The interface makes use of thestandard_form
writer to send the entire model to Gurobi as a single matrix. As a result, it is reasonably performant (on one huge test, it almost got within ~2x of COEK).Like all solvers in
contrib.solver
, this is still a work in progress. I am opening a PR so that others can begin to poke it.There are still several missing features, including:
Changes proposed in this PR:
pyomo.contrib.solver.gurobi_direct
solverstandard_form
_Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: