Originally posted by: SystemAdmin
In the c++ and Java APIs (probably also Python), the methods that add constraints to a model return the constraint (actually, a pointer to it). Store the constraints someplace (maybe in an array or list). Then go back and call the setBounds method on each constraint whose right hand side changes. You can call setUB or setLB for inequalities (for instance, in your example, I would call setLB to change the 5). If you call setBounds, you need to make one of the bounds infinite when dealing with an inequality. To change an equation, you call setBounds with the new RHS as the value for both bounds.
Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
#CPLEXOptimizers#DecisionOptimization