question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jeanette F commented

How to provide delay while using flexscript code?

Hi Team,

I would like to know on how to provide delay while executing flexscript code.

For example:

1. Check Machine Availability?

2. Delay 5 mins

Repeat 1 & 2

Can you help me with the flexscript code for delay?

Thank you!

FlexSim 21.1.5
flexscriptcodedelay
· 1
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 Jason Lightfoot commented

Discrete event simulation source code expects an immediate result or a new event. Because you want to delay a source code, then you do this by an event that execute the treenode 5 minutes later again. You can use a delayed message, a user event, a process time.
OR you do this in process flow which naturally supports delays of tokens!

· 9
5 |100000

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