Skip to content

Commit

Permalink
Fix/gurobi version (#246)
Browse files Browse the repository at this point in the history
* fix gurobi version check

* add RC

* adjust some versions

* Update src/optlang/gurobi_interface.py

Co-authored-by: Moritz E. Beber <[email protected]>

* review comments

Co-authored-by: Moritz E. Beber <[email protected]>
  • Loading branch information
cdiener and Midnighter authored Nov 15, 2022
1 parent 7485451 commit e8227f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Next Release
------------

1.6.1
-----
* fix the Gurobi version check to allow 10.0

1.6.0
-----
* fixes problem scaling for GLPK
Expand Down
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ classifiers =
License :: OSI Approved :: Apache Software License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python :: 2.7
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Scientific/Engineering :: Mathematics
license = Apache-2.0
description = Formulate optimization problems using sympy expressions and solve them using interfaces to third-party optimization software (e.g. GLPK).
Expand All @@ -35,7 +35,7 @@ keywords =
zip_safe = True
install_requires =
six >=1.9
swiglpk >=1.4.3
swiglpk >=5.0.8
sympy >=1.0
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
tests_require =
Expand Down
2 changes: 1 addition & 1 deletion src/optlang/gurobi_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

try:
version = gurobipy.gurobi.version()
if not (version[0] >= 9 and version[1] >= 5):
if version[:2] < (9, 5):
raise RuntimeError()
except Exception:
raise RuntimeError(
Expand Down

0 comments on commit e8227f6

Please sign in to comment.