Skip to content

Commit

Permalink
dropped CPLEX_DLL (coin-or#469)
Browse files Browse the repository at this point in the history
* dropped CPLEX_DLL

* fixed timeLimit test.

* increase delta for cbc
  • Loading branch information
pchtsp authored Aug 11, 2021
1 parent c775001 commit f2af74e
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 580 deletions.
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,11 @@ py-ve*
.c9

#pycharm
.idea/
.idea/
venv/

# OR files
*.lp
*.mps
*.mst
*.sol
6 changes: 6 additions & 0 deletions HISTORY
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
# Copyright S.A.Mitchell ([email protected]), 2007-
# Copyright F.Peschiera ([email protected]), 2019-
# See the LICENSE file for copyright information.
2.5
measuring wall time and cpu time
unittests
black formatting
refactored tests per solver
dropped support for CPLEX_DLL
2.4 2020-12-22
added mps reading support
updated docs
Expand Down
1 change: 0 additions & 1 deletion pulp/apis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
PYGLPK,
CPLEX_CMD,
CPLEX_PY,
CPLEX_DLL,
GUROBI,
GUROBI_CMD,
MOSEK,
Expand Down
7 changes: 3 additions & 4 deletions pulp/apis/coin_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,7 @@ def solve_CBC(self, lp, use_mps=True):
self.writesol(tmpMst, lp, vs, variablesNames, constraintsNames)
cmds += "mips {} ".format(tmpMst)
if self.timeLimit is not None:
num_threads = self.optionsDict.get("threads", 1)
if num_threads is not None and int(num_threads) > 1:
if self.optionsDict.get("threads", 1) > 1:
warnings.warn("Beware: CBC uses timeLimit as cpu_time, not wall_time")
cmds += "sec %s " % self.timeLimit
options = self.options + self.getOptions()
Expand Down Expand Up @@ -470,8 +469,8 @@ def __init__(
self.fracGap = None
if epgap is not None:
self.fracGap = float(epgap)
if self.timelimit is not None:
self.timelimit = float(self.timelimit)
if self.timeLimit is not None:
self.timeLimit = float(self.timeLimit)
# Todo: these options are not yet implemented
self.cuts = cuts
self.presolve = presolve
Expand Down
2 changes: 1 addition & 1 deletion pulp/apis/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def __init__(

# here we will store all other relevant information including:
# gapRel, gapAbs, maxMemory, maxNodes, threads, logPath
self.optionsDict = kwargs
self.optionsDict = {k: v for k, v in kwargs.items() if v is not None}

def available(self):
"""True if the solver is available"""
Expand Down
Loading

0 comments on commit f2af74e

Please sign in to comment.