From fbe4958179b64e79b96aef0a14fc41b45722b196 Mon Sep 17 00:00:00 2001 From: stu Date: Wed, 2 Jul 2014 11:24:01 +1200 Subject: [PATCH] fixes for duals output, equality constraint printing, and iron python issue --- src/pulp/pulp.py | 2 +- src/pulp/solvers.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pulp/pulp.py b/src/pulp/pulp.py index 898a36e..f7aca00 100644 --- a/src/pulp/pulp.py +++ b/src/pulp/pulp.py @@ -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 diff --git a/src/pulp/solvers.py b/src/pulp/solvers.py index a59ea54..a5e8726 100644 --- a/src/pulp/solvers.py +++ b/src/pulp/solvers.py @@ -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