Is it possible to anticipate on process finish of processor?

Is it possible to anticipate on process finish of processor?

bert_s10
Not applicable
27 Views
4 Replies
Message 1 of 5

Is it possible to anticipate on process finish of processor?

bert_s10
Not applicable

[ FlexSim 20.2.0 ]

I wonder if I can anticipate on the on process finish of a processor. So for example, if I know that within 5 minutes, the processor is going to be finished, I already want to send a task executer to the processor. If you use a fixed process time, it is of course not that difficult to figure out how to do this using process flow, but I want to use a distribution for the process time, so it will be different everytime.

So, how can you send a task executer 5 minutes beforehand to a processor (using a distribution for the process time)?

Is this maybe possible by using custom code in the event triggered source and by saying for example: if left process time - 300 seconds = 0, trigger event? And if so, how would you implement this? (I am not good with custom code/flexscript)

0 Likes
Accepted solutions (1)
28 Views
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel_HsH
Mentor
Mentor
Accepted solution

There are different scenarios in ascending order of difficulty.

  1. You assign a label at the item, that value is the process time. You read this label at the processor to set the process time.
  2. The process time is a statistical distribution. You open the source code and declare the return value to be assigned to a double variable. You assert a label at the item to store this variable value and then you return the variable value as the process time.
  3. Your read the events already created in the event list of the program for the processor object to identify the process finish time.
0 Likes
Message 3 of 5

bert_s10
Not applicable

Yes, I already thought about doing it the first way. Thank you for your response, I will try.

0 Likes
Message 4 of 5

joerg_vogel_HsH
Mentor
Mentor
Message 5 of 5

bert_s10
Not applicable

Thank you very much, I really appreciate. This is more elegant than how I tried to do it.

0 Likes