From c3be1f08e29af4e66e37150720d6995d911d73bf Mon Sep 17 00:00:00 2001 From: pchtsp Date: Tue, 31 Aug 2021 17:52:32 +0200 Subject: [PATCH] fixes #479 --- HISTORY | 5 +++++ pulp/apis/coin_api.py | 2 ++ pulp/pulp.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/HISTORY b/HISTORY index 54971399..b90f117b 100644 --- a/HISTORY +++ b/HISTORY @@ -2,6 +2,11 @@ # Copyright S.A.Mitchell (s.mitchell@auckland.ac.nz), 2007- # Copyright F.Peschiera (pchtsp@gmail.com), 2019- # See the LICENSE file for copyright information. +2.6.0 2021- + dropped packaged choco + fixed bugs + added HiGHS solver + added pysmps dependency for mps parsing 2.5.0 2021-08-11 measuring wall time and cpu time unittests of timeLimit diff --git a/pulp/apis/coin_api.py b/pulp/apis/coin_api.py index b7340772..d2ba6c27 100644 --- a/pulp/apis/coin_api.py +++ b/pulp/apis/coin_api.py @@ -192,6 +192,8 @@ def solve_CBC(self, lp, use_mps=True): args.extend(cmds[1:].split()) cbc = subprocess.Popen(args, stdout=pipe, stderr=pipe, stdin=devnull) if cbc.wait() != 0: + if pipe: + pipe.close() raise PulpSolverError( "Pulp: Error while trying to execute, use msg=True for more details" + self.path diff --git a/pulp/pulp.py b/pulp/pulp.py index 28aa9873..76d8d327 100644 --- a/pulp/pulp.py +++ b/pulp/pulp.py @@ -1998,7 +1998,7 @@ def assignStatus(self, status, sol_status=None): class FixedElasticSubProblem(LpProblem): """ Contains the subproblem generated by converting a fixed constraint - :math:`\sum_{i}a_i x_i = b` into an elastic constraint. + :math:`\\sum_{i}a_i x_i = b` into an elastic constraint. :param constraint: The LpConstraint that the elastic constraint is based on :param penalty: penalty applied for violation (+ve or -ve) of the constraints