question

Patrick Zweekhorst avatar image
0 Likes"
Patrick Zweekhorst asked Jacob Gillespie commented

How to plot the partition content of a list

Hi all,

I want to plot the partition content of a list with the new statistics collector. This is not completely working out as I wanted. I'm waiting on the OnPull and OnPush in the statistics collector and use the PartitionID field to know from which partition something is pulled/pushed. From what I understand the OnPush fires just before the token is actually pushed on the list. I have therefore added a 1 to the content when the push event fires. After this the plot is still incorrect.

To check if I get the correct plot I have also added a dashboard with tracked variables to show the content of the partitions.

How should I plot the content of a partition on a list?

( partitiondashboard.fsm )

Note: It also looks like we are missing some vertical lines in the plots at the start. (can maybe be solved by setting the tracked variables at the start of the simulation)

Thanks,

Patrick

FlexSim 17.2.1
liststatistics collectorpartition content
5 |100000

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

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Jordan Johnson edited

As Jacob said, this is difficult to do, because the List doesn't have the opposite of the OnPush event. (It would probably be an OnEntryRemoved event or something like that, but the List doesn't have that right now).

For this kind of chart, I would use the Zone, which can also have partitions, and keep stats on those partitions. I tried it in your model, and it seemed to work fine. It does look different than the legacy chart. However, it appears that the legacy chart excludes 0-time content changes, while this chart does not.

As far as choosing colors, that is something we plan on addressing in a future version.

partitiondashboard-zone.fsm


5 |100000

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

Jacob Gillespie avatar image
1 Like"
Jacob Gillespie answered Jacob Gillespie commented

You are correct that the OnPush event fires just before the token is actually pushed on the list.

What you are missing is that the OnPull event fires as soon as a token adds a backorder to the list and not when the token is actually pulled. To fix this I listened to the OnExit event of the Pull from List activity.

partitiondashboard-edit.fsm


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

Patrick Zweekhorst avatar image Patrick Zweekhorst commented ·

Hi @Jacob Gillespie

Thank you for this possible solution. Is there also another option which does not require the OnExit at the pull from list activity. If you have multiple places where you pull from the list it is easy to forget one activity. Something else that is not ideal is the hard reference to the list we now have in the statistics collector. Do you maybe know of another way to get this plots?

Something else is that the colors of the lines now depend on the order in which the partitions are added to the list, a different run could therefore get completely different colors for the partitions. Is the only way to handle this to add a value ( in the order 1,2,3... ) to the stats collector at the start of the simulation?

By the way, the plot we now have is still not exactly the same as the legacy chart. Are you sure we are getting the correct plot with the statistics collector?

Thank you,

Patrick

0 Likes 0 ·
partitionplot2.png (26.9 KiB)
Jacob Gillespie avatar image Jacob Gillespie ♦ Patrick Zweekhorst commented ·

@Patrick Zweekhorst Like Jordan said, our stats collector isn't filtering out 0-time content changes. Those blips are the content going to 1 and then immediately going back to 0.

Another difference is we don't have an entry for each partition telling the graph that the content is starting at 0.

0 Likes 0 ·