Is there an easy way to expand the base set of a constraint?
For instance, suppose that I have created @constraint(model, mycons[i in 1:2], x[i] >= 1)
and that I would like to extend it to @constraint(model, mycons[i in 1:4], x[i] >= 1)
?
The only why I found to do that is the following:
@constraintref mycons[1:2]
for i in 1:2 mycons[i] = @constraint(model, x[i] >= 1) end
...
mycons2 = mycons
@constraintref mycons[1:4]
for i in 1:2 mycons[i] = mycons2[i] end