How to obtain the coefficients of linear constraints in JuMP

Hi folks,

I constructed a linear model in JuMP by loading an .lp file.
lp = Model(solver=CPLEX.CplexSolver())
lp.internalModel = MathProgBase.LinearQuadraticModel(lp.solver)
MathProgBase.loadproblem!(lp.internalModel,“temp.lp”)

I wonder if there is anyway to get the constraint matrix of this LP model, i.e., how to get the coefficients of this LP model in Julia?

Thanks in advance!

Regards,
Can

Depending on the solver, this might not be implemented.
https://mathprogbasejl.readthedocs.io/en/latest/lpqcqp.html#getconstrmatrix

1 Like