-
Notifications
You must be signed in to change notification settings - Fork 526
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
CPLEXDirect performance improvements #1416
Merged
Merged
Changes from 12 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
49039a7
:zap: Initialise `CplexExpr` with full list
ruaridhw b225180
:hammer: No need to set an empty quadratic coef
ruaridhw c5e5841
:zap: `get_values()` efficiently
ruaridhw 622c4d0
:zap: Add linear constraints and variables in one transaction
ruaridhw f61fe42
:zap: Avoid calling `set_bounds()` when not necessary
ruaridhw 7ff9742
:rotating_light: Test `nullcontext()`
ruaridhw 4cd2c5a
:rotating_light: Test CPLEX Data Containers
ruaridhw 274f9e5
:rotating_light: Test `_add_var()`
ruaridhw 6414dda
:rotating_light: Test `_add_constraint()`
ruaridhw e363afe
:rotating_light: Test `load_vars()`
ruaridhw e0ab4f6
:hammer: Use `store_in_cplex()` instead of ctxmanager
ruaridhw 742d8bc
:books: Formatting
ruaridhw fc0b8cc
:hammer: Refactor quadratic objective handling
ruaridhw 41428a0
:bug: Cast quadratic coefficients to floats explicitly
ruaridhw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Oops, something went wrong.
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.
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.
@ruaridhw I don't think this line should be removed completely. However, it can be simplified to:
If this line is not included, then the quadratic part of the objective will not be updated correctly between solves (for the persistent interface).
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.
@michaelbynum, could you provide a small example of how this would break? I'd like to add a test case to that effect.
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.
@ruaridhw This should demonstrate the issue:
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.
@michaelbynum, I've added a fix and this test case. The main issue I had was that the quadratic objective interface shouldn't be triggered if the model is a MILP. Let me know if 1b555dc is acceptable.