fixes for duals output, equality constraint printing, and iron python issue

This commit is contained in:
stu
2014-07-02 11:24:01 +12:00
parent 26ac7d342f
commit fbe4958179
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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