# Decision Optimization

View Only

## Transition times with an intensity function

• #### 1.  Transition times with an intensity function

Posted Sun May 22, 2022 03:36 PM

Hello,

So in my scenario I have a set of 5 machines and I need to have a transition time from each order that is scheduled for the machine.
However, I also needed to apply an intensity function to it , to make sure the delay is in business hours because the machines only work from 9 to 17 and if an order ends at 17, it should wait x hours from 9 the next day.
I thought about adding a task that represents this delay and apply that intensity function to it, but is there any better way to do it?

------------------------------
Vasco Ferreira
------------------------------

• #### 2.  RE: Transition times with an intensity function

Posted Mon May 23, 2022 02:46 PM
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]);
lengthOf(setups[p]) = TD[typeOfPrev(processing, opers[p])][p.type];
}
noOverlap(s, TD);
noOverlap(occupation);
sameSequence(processing, occupation)

------------------------------
Jerome Rogerie
------------------------------

• #### 3.  RE: Transition times with an intensity function

Posted Tue May 24, 2022 10:43 AM

Hello Jerome,

However, there's an issue: the part where you have span(tasks[p], [setups[p], opers[p]]); , for me it doesn't let me use the variable p there.

------------------------------
Vasco Ferreira
------------------------------

• #### 4.  RE: Transition times with an intensity function

Posted Wed May 25, 2022 06:17 AM
Hi Vasco

[setups[p], opers[p]] is an array. I do not remember how make such a so simple stuff in OPL (ugly syntax). If you know tell me either I will have a look in the doc.

Sorry also for the late answer, I was on leave end of last week.

------------------------------
Jerome Rogerie
------------------------------

• #### 5.  RE: Transition times with an intensity function

Posted Wed May 25, 2022 09:15 AM
Hi Vasco

If I am not wrong, The syntax to build the array [setups[p], opers[p]] in the p loop should be

span( tasks[p], (append all (p1 in POS; p1 = p) setups[p], all (p1 in POS; p1 = p) opers[p]));

------------------------------
Jerome Rogerie
------------------------------