opencobra / optlang

optlang - sympy based mathematical programming language
http://optlang.readthedocs.org/
Apache License 2.0
242 stars 51 forks source link

possible bug in gurobi version #245

Closed hariszaf closed 1 year ago

hariszaf commented 1 year ago

Hi there,

I am running python 3.10.6 and I just installed gurobi 10.

It is my belief that line 39 could lead to an issue as:

>>> import gurobipy
>>> version = gurobipy.gurobi.version()
>>> version
(10, 0, 0)

and the if statement in the gurobi_interface.py script asks for:

if not (version[0] >= 9 and version[1] >= 5):
        raise RuntimeError()`

Hope this helps and apologies if I have missed something.

cdiener commented 1 year ago

Definitely, you are right. Will submit a fix.

hariszaf commented 1 year ago

Glad it helped!