Originally posted by: G.B.
Hello, I have .mod where I declare an array of Tuples. After the Linear Program is solved, I want to populate this array with a script. I have tried several options, but I keep getting an error.
What is the best way of populating an array of Tuples with an OPL script?
My array of Tuple is:
tuple TPlan {
int start;
int end;
};
TPlan plan [session][1..horizon.nbPeriods];
My Variables:
dvar boolean Start[session][Rangeperiods];
dvar boolean End[session][Rangeperiods];
My current script (giving an error):
execute UPDATE_RESULTS {
for(var s in session) {
for (var p in Rangeperiods) {
plan[s][p].add(Start[s][p], End[s][p]);
}
}
}
#DecisionOptimization#OPLusingCPLEXOptimizer