How to create a JuMP constraint with coeffs and rhs?



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!




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


Thanks!. That worked!