MathProgBase internal model: get constraint sens


#1

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


#2

MathProgBase represents LPs with constraints in the form:

lb<=Ax<=ub

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