Skip to content
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.4.3 #185

Merged
merged 119 commits into from
Aug 9, 2018
Merged

1.4.3 #185

merged 119 commits into from
Aug 9, 2018

Conversation

KristianJensen
Copy link
Contributor

  • Fix various logging bugs
  • Fix a bug where certain expressions could not be parsed with symengine

KristianJensen and others added 30 commits January 4, 2017 14:01
Only update the _variables_to_constriants_mapping dict when new_name !=
old_name
Only _round_primals_to_bounds if solution is optimal
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
KristianJensen and others added 22 commits November 22, 2017 11:34
* Add gurobi QPs

* add some fixes and QP tests for gurobi
* fix: make releases from only one Python version

* refactor: make use of Travis deployment

* fix: exclude CPLEX on Python 3.6

* refactor: add further condition, remove dependencies

* refactor: reduce clone depth, branches built

* refactor: limit AppVeyor in the same way
* feat: raise an error when GLPK fails to read/write a file

* feat: implement checks of variable and constraint names

Both during initialization and subsequent changes

* fix: call the validation methods in subinterfaces

* test: added tests for name checks

* fix: call name checks in gurobi

* fix: Variable cannot be initialized with name=None
Don’t crash if variable does not have a problem
cplex_interface.Configuration was setting the root logger level to CRITICAL which silences most other logging output across the process.
Changed the logger name to optlang.cplex_interface.Model to make it
clear that the logging comes from optlang and not from cplex itself.
* refactor: make base constants real numbers

Using real numbers avoids certain corner cases where integers are either
undesired, e.g., in `set_linear_coefficients` or they would be
simplified out as in `Mul(One, variable)`.

* fix: correct test cases accordingly

* fix: return statement to integer comparison

* chore: only construct Integer(1) once

* test: add constraint and objective construction tests with sloppy

* fix: make scipy get_linear_coefficients return regular numeric types
Symengine doesn’t do any expansions (even of constants), which causes
bugs. Expanding is very fast in symengine, so performance is not
impacted
@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #185 into master will increase coverage by 0.01%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
+ Coverage   89.95%   89.97%   +0.01%     
==========================================
  Files          10       10              
  Lines        2598     2603       +5     
  Branches      571      573       +2     
==========================================
+ Hits         2337     2342       +5     
  Misses        169      169              
  Partials       92       92
Impacted Files Coverage Δ
optlang/cplex_interface.py 92.4% <100%> (ø) ⬆️
optlang/interface.py 92.15% <100%> (+0.03%) ⬆️
optlang/symbolics.py 100% <100%> (ø) ⬆️
optlang/scipy_interface.py 84.71% <66.66%> (+0.03%) ⬆️
optlang/expression_parsing.py 84.52% <66.66%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daa789a...2823849. Read the comment docs.

@phantomas1234 phantomas1234 merged commit 8da74d1 into master Aug 9, 2018
@ghost ghost removed the ready label Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.