Skip to content

Commit 5be75f2

Browse files
committed
fix path for gurobi on windows
Former-commit-id: 223e75e [formerly 97b9de6] Former-commit-id: 22588a0
1 parent eee2d5b commit 5be75f2

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

mip/callbacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class CutsGenerator:
1515
"""abstract class for implementing cut generators"""
1616

1717
def __init__(self):
18-
pass
18+
self.lazyConstraints = False
1919

2020
def generate_cuts(self, model: Model):
2121
"""Method called by the solver engine to generate cuts

mip/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from enum import Enum
44

5-
VERSION = '1.3.9'
5+
VERSION = '1.3.10'
66

77
# epsilon number (practical zero)
88
EPS = 10e-6

mip/gurobi.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import os.path
66
from glob import glob
77
from os import environ
8+
from sys import platform
89
from cffi import FFI
910
from mip.model import Model, Solver, Column, Var, LinExpr, Constr, \
1011
VConstrList, VVarList
@@ -17,9 +18,13 @@
1718
lib_path = None
1819

1920
if 'GUROBI_HOME' in environ:
20-
libfile = glob(os.path.join(os.environ['GUROBI_HOME'],
21-
'lib/libgurobi[0-9][0-9].*'))
22-
21+
if platform.lower().startswith('win'):
22+
libfile = glob(os.path.join(os.environ['GUROBI_HOME'],
23+
'bin\gurobi[0-9][0-9].dll'))
24+
else:
25+
libfile = glob(os.path.join(os.environ['GUROBI_HOME'],
26+
'lib/libgurobi[0-9][0-9].*'))
27+
2328
if libfile:
2429
lib_path = libfile[0]
2530

0 commit comments

Comments
 (0)