MathProgBase internal model: get constraint sens


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


MathProgBase represents LPs with constraints in the form:


as you can see in the manual.

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

1 Like