Originally posted by: chrysg
Paul,
Thank you very much for the response....I have gotten this far:
For a current IloExtractable object "extr":
1) When the object is a variable, I can do
extr.asVariable().setBounds(lo,hi);
and this works fine, i.e., the variable in the modified model now has new bounds.
2) When the object is a constraint, however, when I do
extr.asConstraint()...
I get back a handler to an object of type IloConstraint, for which no direct manipulation methods exist, i.e., I cannot do setBounds() or setLinearCoef()....these are typically methods for IloRange objects (all my constraints are supposed to be of IloRange type).
So, my next question is:
How do I go from an IloConstraint to an IloRange ? (direct typecasting does not seem to work).
Thanks,
chrysg
#CPLEXOptimizers#DecisionOptimization