# Get array of sequences for array of interval arrays in OPL

So I want to define multiple sequences (an array of them). I have this:

dvar interval casy[d in 1..Domy][ukol in Ukoly] size Trvani[ukol];

dvar sequence S[d in 1..Domy] in i in casy[d];


I get an error: Cannot use domain type dvar interval[][Ukoly] for dvar sequence. But when I use:

dvar interval casy[ukol in Ukoly] size Trvani[ukol];

dvar sequence S in i in casy;


everything just runs fine. Also, when I use

dvar interval casy[d in 1..Domy][ukol in Ukoly] size Trvani[ukol];

dvar sequence S[d in 1..Domy] in i in casy;


it works, but the sequences are for all the intervals, which I dont want. I want to have different sequences separately for each array of intervals, indexed by d.

I just can't understand why would it use the array of intervals when I declare it normally, but would complain when I pull the same exact interval from an array by its index.

Is there something I am missing?

dvar sequence workers[w in WorkerNames] in