# How to obtain the coefficients of linear constraints in JuMP

**URL:** <https://discourse.julialang.org/t/how-to-obtain-the-coefficients-of-linear-constraints-in-jump/11117>\
**Category:** Optimization (Mathematical)\
**Created:** [May 24, 2018, 1:45am UTC](https://discourse.julialang.org/t/how-to-obtain-the-coefficients-of-linear-constraints-in-jump/11117 "2018-05-24T01:45:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CanLi1](https://avatars.discourse-cdn.com/v4/letter/c/6a8cbe/32.png) [@CanLi1](https://discourse.julialang.org/u/CanLi1)\
**Post date:** [May 24, 2018, 1:45am UTC](https://discourse.julialang.org/t/how-to-obtain-the-coefficients-of-linear-constraints-in-jump/11117/1 "2018-05-24T01:45:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [May 24, 2018, 3:10am UTC](https://discourse.julialang.org/t/how-to-obtain-the-coefficients-of-linear-constraints-in-jump/11117/2 "2018-05-24T03:10:52Z")

</div>

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