Originally posted by: SystemAdmin
[Katrin said:]
Hi all,
I'm trying to use cplex under C++ the first time and I have a problem with the method "add" from IloNumVarArray. I would like to build up an Array of size 5 where the elements of the array are arrays of the IloNumVarArray. For example the first element should be an IloNumVarArray of all Flow Variables, and the second element should be an IloNumVarArray of all RessourceVariables.
I tried this:
IloArray<IloNumVarArray> arrarrNumVar(env, 5);
Afterwards I tried to add all Variables in loops to this arrarrNumVar. I did this like this:
arrarrNumVar[0].add(IloNumVar(env,0,1,ILOBOOL,"FlowVariable1"));
However this doesn't work. Certaintly that's a beginner's mistake. However I'm deeply grateful for any suggestion.
Katrin
#CPLEXOptimizers#DecisionOptimization