-
Notifications
You must be signed in to change notification settings - Fork 51
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
Various bug fixes #126
Merged
Merged
Various bug fixes #126
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8c2c88b
Use real functions for gurobi tolerances (#124)
cdiener f74c447
Don't trigger update in _get_expression with gurobi (#121)
cdiener 44bdb7a
newer Gurobi raises AttributeError if objective value is invalidated …
cdiener 935fb9c
fix: make sure only relevant attribute retrieval can get excepted
KristianJensen 1172bfa
fix: memory leak when garbage collecting glpk models
KristianJensen 91d93f1
Fix gurobi constraint primal calculation (#120)
cdiener e0ff077
fix: make gurobi constraint primal handle range constraints
KristianJensen 297d230
fix: make gurobi configuration picklable
KristianJensen 9c28a5e
chore: workaround cplex get_indices slowness
KristianJensen a3fbbea
fix: flake8
KristianJensen 6db0f35
test: test objective with over 1000 variables
KristianJensen 4b7d44d
Merge branch 'devel' into bug-fixes
KristianJensen 7e9b5bc
fix: comment out glpk model __del__ method
KristianJensen 846e546
chore: make duality ready for symengine
KristianJensen 372307e
fix: make symengine symbol picklable
KristianJensen b59c7f1
test: adapt expression_parsing tests to symengine
KristianJensen 992acde
test: skip large objective test with scipy
KristianJensen 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
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
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
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
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
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
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
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
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.
You might also need to delete self._variables/constraints/objective here since the Python GC does not resolve cyclical dependencies automatically for objects that have a del method for some older Python versions I think...
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.
The problem is that
__del__
is only being called when the object is garbage collected (which it isn't in this case if it has a__del__
method) :(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.
Ah ok, good catch. Maybe wrap glp_prob into its own class with a
__del__
method, use the wrapped object as Model.problem and rather reference Model instead of Model.problem in the objective?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.
That would probably work, but perhaps a better solution would be to use weakrefs for the references to Models in Variables, Constraints and Objectives?
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.
Yes! That is a great idea!