opencobra / optlang

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

possible bug in gurobi version #245

Closed hariszaf closed 2 years ago

hariszaf commented 2 years 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 2 years ago

Definitely, you are right. Will submit a fix.

hariszaf commented 2 years ago

Glad it helped!