I am new to JUMP model and Julia,
I have created a JUMP model, with a constraint inside a while loop
I wanted to change the constraint name in each iteration and optimize the model again
@constraint(model, constraint_1[t=1:nt], flow<= maxflow])
again if i=2
@constraint(model, constraint_2[t=1:nt], flow>= minflow])
Hi @ayodyas, I’m not really sure what you mean by changing the constraint names? Do you want to add new constraints? Or delete
constraint_1 and add
flow a variable and
maxflow a constant? If so, you can use
delete_upper_bound to add and remove different bounds.
Otherwise you can delete constraints:
p.s., You might want to take a read of Please read: make it easier to help you. It explains how to format your code, and it’s easier to help if you can provide a fully reproducible example.