Originally posted by: SystemAdmin
[dgravot@noos.fr said:]
Hello,
I'm running my OPL model from JAVA and creates new variables [i]after[/i] the model has been generated.
While accessing named constraints of my OPL model, I get IloConstraintMap object that i'm able to query with related indexed "key" , such as :
IloForAllRange rangeOneFraction = (IloForAllRange) ctrOneFraction.getSub(tk).get(t);
Apparently, I'm not able to create an IloColumn on a collection of IloForAllRange objects, which is possible on the IloRange objects. The only way that seems available is using the setLinearCoeff api :
IloNumVar FVar = cplex.numVar(0, Double.MAX_VALUE,"FVAR_"+nbColums);
IloForAllRange rangeOneFraction = (IloForAllRange) ctrOneFraction.getSub(tk).get(t);
cplex.setLinearCoef(rangeOneFraction, FVar, 1.0 );
For performance issues, however, I'd like to be able to use IloColumn instead
Is there a way to achieve that ?
Thank you
#DecisionOptimization#OPLusingCPLEXOptimizer