Update solvers.py

fix of typo and string conversion
This commit is contained in:
timnon
2015-04-23 09:29:57 +02:00
parent e0757f9f50
commit 1b5e9c697d

View File

@@ -463,7 +463,7 @@ class CPLEX_CMD(LpSolver_CMD):
cplex = subprocess.Popen(self.path, stdin = subprocess.PIPE)
cplex_cmds = "read "+tmpLp+"\n"
if self.timelimit is not None:
cplex_cmds += "set timelimit " + self.timelimt + "\n"
cplex_cmds += "set timelimit " + str(self.timelimit) + "\n"
for option in self.options:
cplex_cmds += option+"\n"
if lp.isMIP():
@@ -2523,4 +2523,4 @@ class GurobiFormulation(object):
self.objective.name = name
else:
raise TypeError("Can only add LpConstraint, LpAffineExpression or True objects")
return self
return self