How to create a JuMP constraint with coeffs and rhs?


#1

Hello.

I’m trying to run an algorithm generating Gomory cuts. I managed to get the right tableau row. Now I would like to add the cut to the JuMP model having a vector of indices, coeffs, sense and rhs. So far I could only do it using the MathProgBase addconstr!

Thanks

Braulio


#2

You can convert indices into JuMP variables by using the Variable(m::Model,idx::Int) constructor.


#3

Thanks!. That worked!