jump-dev/Clp.jl

getconstrmatrix produces ERROR: UndefVarError: SparseMatrixCSC not defined

EdvinAblad opened this issue · 2 comments

Hi,
I'm using Clp through JuMP, calling the code:

using SparseArrays
using MathProgBase
using JuMP
using Clp
m = Model(solver = ClpSolver())
JuMP.build(m)
MathProgBase.getconstrmatrix(internalmodel(m))

(It also breaks if the model is non-empty, the above is simply a small example)

produces the error:

ERROR: UndefVarError: SparseMatrixCSC not defined
Stacktrace:
 [1] getconstrmatrix(::Clp.ClpMathProgSolverInterface.ClpMathProgModel) at C:\Users\MärtaEdvin\.juli
a\packages\Clp\qWiux\src\ClpSolverInterface.jl:116
 [2] top-level scope at none:0

including using SparseArray inClpSolverInterface.jl, resolves the problem.
Is this an real issue or am I misusing the MathProgBase.getconstrmatrix?

Looks like a real issue. PR welcome :)

Closed by #46