fixes for duals output, equality constraint printing, and iron python issue
This commit is contained in:
@@ -851,7 +851,7 @@ class LpConstraint(LpAffineExpression):
|
||||
|
||||
def __str__(self):
|
||||
s = LpAffineExpression.__str__(self, 0)
|
||||
if self.sense:
|
||||
if self.sense is not None:
|
||||
s += " " + LpConstraintSenses[self.sense] + " " + str(-self.constant)
|
||||
return s
|
||||
|
||||
|
||||
@@ -1330,7 +1330,7 @@ class COIN_CMD(LpSolver_CMD):
|
||||
cmds += "branch "
|
||||
else:
|
||||
cmds += "initialSolve "
|
||||
cmds += "printingOptions rows "
|
||||
cmds += "printingOptions all "
|
||||
cmds += "solution "+tmpSol+" "
|
||||
if self.msg:
|
||||
pipe = None
|
||||
@@ -1964,7 +1964,7 @@ class PYGLPK(LpSolver):
|
||||
#import the model into the global scope
|
||||
global glpk
|
||||
import glpk.glpkpi as glpk
|
||||
except ImportError:
|
||||
except:
|
||||
def available(self):
|
||||
"""True if the solver is available"""
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user