question

Bert S10 avatar image
0 Likes"
Bert S10 asked Bert S10 commented

Is it possible to anticipate on process finish of processor?

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)

FlexSim 20.2.0
processflowflexscriptprocessorflexsim 20.2.0process time
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Bert S10 commented

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.
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Bert S10 avatar image Bert S10 Joerg Vogel commented ·

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

0 Likes 0 ·
Bert S10 avatar image Bert S10 commented ·

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

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.