Hi Fasco
As setup does not behave only as a integer delay, it has to be associated with an interval variable.
I give you an OPL sketch for one machine and n task of setup given by a transition time TD, n tasks all present
tuple pos = ...;
{pos} POS = ...;
dvar interval opers[p in POS] size p.size efficiency f
dvar interval setups[p in POS] efficiency f
dvar interval tasks [p in POS]:
dvar sequence processing opers types (all p in POS) p.type
forall (p in POS) {
endBeforeStart(setups[p], opers[p]);
span(tasks[p], [setups[p], opers[p]]);
lengthOf(setups[p]) = TD[typeOfPrev(processing, opers[p])][p.type];
}
noOverlap(s, TD);
dvar sequence occupation tasks
noOverlap(occupation);
sameSequence(processing, occupation)
------------------------------
Jerome Rogerie
------------------------------