From 7503e0784a4ad6dfd1aa603ce8d83303f3c1c8e3 Mon Sep 17 00:00:00 2001 From: Ted Ralphs Date: Mon, 11 May 2020 15:30:53 -0400 Subject: [PATCH] Fix for matrix read in from MPS file --- src/cuppy/cuttingPlanes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cuppy/cuttingPlanes.py b/src/cuppy/cuttingPlanes.py index 62b26b3..8eb2fe0 100644 --- a/src/cuppy/cuttingPlanes.py +++ b/src/cuppy/cuttingPlanes.py @@ -335,7 +335,10 @@ def solve(m, whichCuts = [], use_cglp = False, debug_print = False, eps = EPS, else: b = m.lp.constraintsLower.copy() mult = 1.0 - A = m.A.copy() + if type(m.A) == csc_matrixPlus: + A = m.A.toarray() + else: + A = m.A.copy() for i in range(m.lp.nCols): e = np.zeros((1, m.lp.nCols)) if m.lp.variablesUpper[i] < infinity: