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.

Steven Chen avatar image Steven Chen commented ·

@jordan.johnson Thank you.

By the way I add a time plot to display ExitTime vs StayTime, but the chart doesn't update correctly. Switch to another page and switch back will fix this.

11435-statscollectordemodashboard.fsm

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Steven Chen commented ·

The timeplot assumes that values don't change, once they are added to the chart. In your case, you are changing values from null to a time value. Right now, the only way to get the chart to re-evaluate rows in the bundle is to set the Y Axis Range option to Adaptive. In your case, I think that will display the data you want.

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.