Originally posted by: Didier Vidal
Hello,
I think that the issue is about the OPL syntax. Here is a trick that would solve it I guess:
1) Declare a key to the tuple My Task (note: that should be done only if the key uniquely defines a tuple)
tuple MyTask
{ key string Ordid; string TaskName; string Worker;
int Duration;
}
Once this is done, it is possible to retreive an element of a set of MyTask, just by an order ID.
Because the second indexer of itvs is a set of MyTask, this feature can be used.
2) retrieve a element of the TaskData set for second indexer of itvs, using the
<key>
syntax
endBeforeStart(itvs[o][<p.pre>], itvs[o][<p.post>]);
Hope this helps.
Didier.
#CPOptimizer#DecisionOptimization