Originally posted by: Dogdog
Hi all.
I want to know how to access a sequence variable in post processing.
This is an excerpt from my code:
int nbJobs = ...;
range Jobs = 1..nbJobs;
int duration[Jobs] = ...;
dvar interval task[j in Jobs] size duration[j];
dvar interval opttask[j in Jobs][m in Machines] optional size duration[j];
dvar sequence schedule[m in Machines] in all(j in Jobs) opttask[j][m];
execute {
writeln(schedule[1]);
};
In the last execute box, I want to access the "schedule" variable. I tried to search in the ILOG CPLEX Help, but in there there are only two methods for accessing sequence variable, i.e. ".first()" and ".last()". I want to access the "position" and "declaredPosition" in the sequence variable.
Thanks before for helping.
#DecisionOptimization#OPLusingCPLEXOptimizer