# MathProgBase internal model: get constraint sens

**URL:** <https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946>\
**Category:** Optimization (Mathematical)\
**Created:** [March 29, 2017, 10:16am UTC](https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946 "2017-03-29T10:16:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pierre-Louis\_Poirion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pierre-louis_poirion/32/19257_2.png) [@Pierre-Louis\_Poirion](https://discourse.julialang.org/u/Pierre-Louis_Poirion)\
**Post date:** [March 29, 2017, 10:16am UTC](https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946/1 "2017-03-29T10:16:03Z")

</div>

Hello

When accessing the internal model of an LP with MathProgBase, is there some way to access the sens of the constraints of the LP?

Thanks  
PL

---

<div class="post-metadata">

**Author:** ![joaquimg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joaquimg/32/223_2.png) [@joaquimg](https://discourse.julialang.org/u/joaquimg)\
**Post date:** [March 29, 2017, 12:39pm UTC](https://discourse.julialang.org/t/mathprogbase-internal-model-get-constraint-sens/2946/2 "2017-03-29T12:39:56Z")

</div>

MathProgBase represents LPs with constraints in the form:

```julia
lb<=Ax<=ub

```

as you can see in the [manual](https://mathprogbasejl.readthedocs.io/en/latest/lpqcqp.html#getconstrLB).

So you must use `getconstrLB(m::AbstractLinearQuadraticModel)` and `getconstrUB(m::AbstractLinearQuadraticModel)`.  
With those in hand, either you have the same value, hence equality, is one is infinity then you can decide between `>=` and `<=`. You can also have range constraints where `-Inf < lb < ub < +Inf`
