-
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
1.2.5 #139
Merged
Merged
1.2.5 #139
Conversation
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
Only update the _variables_to_constriants_mapping dict when new_name != old_name
Only _round_primals_to_bounds if solution is optimal
Default is set to 1e-9
E.g. numpy and sympy
* feat: add get_linear_coefficients method Abstract non-implemented method * feat: implement glpk get_linear_coefficients method * fix: typo * feat: implement get_linear_coefficients in cplex * feat: implement get_linear_coefficients in gurobi * feat: implement get_linear_coefficients in scipy * test: add tests for get_linear_coefficients * test: more tests for get_linear_coefficients * fix: flake8 * fix: missing arguments in test * fix: make scipy consistent with other interfaces the get_linear_coefficients and set_linear_coefficients methods now raise an exception if the objective/constraint doesn’t belong to a model
Some cplex versions don’t have all the statuses that optlang tries to import, which would result in a crash.
For range constraints, rhs is now equal to lb
This is due to a bug where gurobi can get stuck
* checking if __del__ is needed * testing against miplib * using problems from miplib2003 * needs to implement variable comparison for problems that converge * more problems runtime: 10 min per problem * fixed milp test value (same as in devel) * delete problem from memory only if it exists (__del__ method) * add a .keep file to keep the miplib2003 directory on tests/data * miplib test with cplex - some problems also fail... * need to implement a parser for .sol files * set 9 min limit for optimization to run, otherwise travis halts after 10 min without output * refactor: tests and move into slow_tests top directory * style: flake8 * fix: no point in searching ImportError for 'cplex' * test: add slow MILP tests for gurobi
* Fix LB/UB Coefficient Change (#82) * Fix LB/UB Coefficient Change If coeff is negative, the lower bound could become larger than the upper bound causing an error. Now, the upper bound is first removed and then both bounds are reapplied with the shift. * Update interface.py * test: add unittest for constraint expression standardisation * fix: flake8 * fix: flake8 again * refactor: simplify logic in constraint offset handling
* feat: add cloned model tests to netlib test suites * chore: add cloned model tests also for gurobi * fix: critical bug affecting ranged constraints in cplex interface * test: skip netlib cloning tests on travis
* feat: add tolerance parameters to Configuration * fix: pickling cplex configurations * feat: default pickling method for models (json-based) Fixes scipy pickling * test: add tolerance param testing * fix: test case bug * fix: glpk tolerance names
The expression of an objective can now include constant terms, and the solver will correctly account for this when reporting the objective values.
Prevent objective values from being sympy types
Add symbolics.py module that handles sympy/symengine calls Symengine.py 0.3 is required. Symengine can be installed with conda `conda install -c symengine -c conda-forge python-symengine` If symengine is available optlang will attempt to use it automatically
Variables with empty names trigger's segfaults in glpk interface. Easiest fix appears to simply not allow them as anyway not meaningful.
- Make gurobi models picklable - Fix gurobi infinite recursion - Fix gurobi constraint primal calculation - Fix a bug where cplex took forever to set a large objective (e.g. 10000 vars) - Fix some issues with symengine compatibility
Bounds can be set to 0 or 1 (both lb and ub). Also added tests.
Conflicts: optlang/tests/test_scipy_interface.py
* Add basic types to optlang.symbolics * Handle edge cases in add and mul * also add Basic and Number to sympy wrapper
# Conflicts: # optlang/symbolics.py
Codecov Report
@@ Coverage Diff @@
## master #139 +/- ##
=======================================
Coverage 89.86% 89.86%
=======================================
Files 9 9
Lines 2507 2507
Branches 553 553
=======================================
Hits 2253 2253
Misses 167 167
Partials 87 87
Continue to review full report at Codecov.
|
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.
Add missing unpacking in symengine Mul