question

Stan Davis avatar image
0 Likes"
Stan Davis asked Stan Davis commented

Message Following Delay Activity Observation

While developing another model, I observed a peculiar behaviour with messages and delay activities.

I attached a simple model demonstrating behaviour.

Using a process flow, a token arrives at 12:00 am 1/1/2024.

A message is immediately displayed showing Model.dateTime.dayOfWeek.

This is followed by a delay of 1440 minutes before the another message is displayed also showing Model.dateTime.dayOfWeek.


1679418060751.png


However, the 2nd message is shown before the delay activity completes in the Process Flow. Why is this?? The run speed greatly affects this observation.


1679419520389.png


The token then moves to the 2nd message activity at the correct time...


1679418611551.png

Note that this is observed with both minutes and seconds model time units.

Thanks


Message Following Delay Observation - 21MAR23.fsm

FlexSim 23.0.5
delaytimemessages
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

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Stan Davis commented

Alert boxes prevent the Process Flow view from being repainted. The token appears to be on the Delay activity because that was where it was last painted before the alert appeared.

If you change the second Custom Code to contain this line:

msg("Message 2", string.fromNum(Model.dateTime.dayOfWeek) + " " + token.activity.name);

You'll see that the alert box reports that the token is currently in the "Show Day of Week" activity, not the "Delay" activity.

· 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.

Stan Davis avatar image Stan Davis commented ·
Thanks for the clarification.
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.