-
Notifications
You must be signed in to change notification settings - Fork 557
Change how available
and license
work in new solver interfaces
#3743
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
base: main
Are you sure you want to change the base?
Conversation
available
and license
work in new solver interfaces
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 have not done a detailed review, but I had a couple questions after skimming this.
NotFound = 0 | ||
BadVersion = -1 | ||
BadLicense = -2 | ||
NeedsCompiledExtension = -3 |
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.
Why throw out NeedsCompiledExtension
? I could definitely see us using this occasionally. I don't think there is a current use case. I guess we could easily add it back in if needed?
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.
We aren't using it currently so I took it out. We have no issues adding it back in if it actually becomes a valid case again.
vtype=vtype, | ||
|
||
# Acquire a Gurobi env for the duration of solve (opt + postsolve): | ||
with self.license(): |
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.
Will this release the license even if the user called acquire
on their own?
Fixes None (but is part of #3688)
Summary/Motivation:
As part of the solver redesign effort, we decided to change how
available
and licensing in general will work in the new solver interface paradigm. This implements the most recent comment in #3688 for all existing solvers.Changes proposed in this PR:
available
basically meanslicense
attribute to each solver (default is no operation)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: