question

Steven Chen avatar image
0 Likes"
Steven Chen asked Jordan Johnson commented

Involved Item On Staytime Change

Hello,

When using event "On Staytime Change" in statistics collector, how do I get the item that causes staytime changing?

FlexSim 18.1.0
statistics collectorstaytime
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 Jordan Johnson commented

The involved item is not available with the OnChange events. You can listen to the OnEntry of the next object, which will give you and involved reference. When that event occurs, the previous object's staytime will reflect the time that the involved spent in the current object.

Another option is to use a Statistics Collector. This has the advantage of being able to track items across multiple objects, but can also be used in your case. Here is a demo model:

statscollectordemo.fsm

The Statistics Collector is listening to the OnEntry and OnExit of the Queue. It makes one row per flow item. When the item enters the queue, the collector records the item's type and the current time. When the item exits the queue, the collector records the current time, as well as the difference between the current time and the entry time. This produces the information you want:


· 2
5 |100000

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