Skip to content

Commit 1d519e0

Browse files
committed
Add support for gurobi v10 (#316)
1 parent 7ae9e35 commit 1d519e0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mip/gurobi.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@
5454
if "GUROBI_HOME" in environ:
5555
if platform.lower().startswith("win"):
5656
libfile = glob(
57-
os.path.join(os.environ["GUROBI_HOME"], "bin\\gurobi[0-9][0-9].dll")
57+
os.path.join(os.environ["GUROBI_HOME"], "bin\\gurobi[0-9][0-9][0-9].dll")
5858
)
5959
else:
6060
libfile = glob(
61-
os.path.join(os.environ["GUROBI_HOME"], "lib/libgurobi[0-9][0-9].*")
61+
os.path.join(os.environ["GUROBI_HOME"], "lib/libgurobi[0-9][0-9][0-9].*")
6262
)
6363
if not libfile:
6464
libfile = glob(
6565
os.path.join(
6666
os.environ["GUROBI_HOME"],
67-
"lib/libgurobi.so.[0-9].[0-9].*",
67+
"lib/libgurobi.so.[0-9].[0-9].[0-9].*",
6868
)
6969
)
7070

@@ -78,15 +78,15 @@
7878
minor_ver = vs[1]
7979

8080
if lib_path is None:
81-
for major_ver in reversed(range(6, 10)):
81+
for major_ver in reversed(range(6, 11)):
8282
for minor_ver in reversed(range(0, 11)):
8383
lib_path = find_library("gurobi{}{}".format(major_ver, minor_ver))
8484
if lib_path is not None:
8585
break
8686
if lib_path is not None:
8787
break
8888

89-
# Check for gurobi 9.5 through pip installation
89+
# Check for gurobi through pip installation
9090
if lib_path is None:
9191
gurobipy_spec = importlib.util.find_spec("gurobipy")
9292
if gurobipy_spec:

0 commit comments

Comments
 (0)