How to plot the partition content of a list

How to plot the partition content of a list

patrick_zweekhorst
Advocate Advocate
24 Views
4 Replies
Message 1 of 5

How to plot the partition content of a list

patrick_zweekhorst
Advocate
Advocate

[ FlexSim 17.2.1 ]

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.

8846-partitionplot.png

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

0 Likes
Accepted solutions (1)
25 Views
4 Replies
Replies (4)
Message 2 of 5

Jacob_Gillespie
Autodesk
Autodesk

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

Message 3 of 5

patrick_zweekhorst
Advocate
Advocate

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?

8855-partitionplot2.png

Thank you,

Patrick

0 Likes
Message 4 of 5

JordanLJohnson
Autodesk
Autodesk
Accepted solution

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.

8868-zonepartitioncontentchart.png

partitiondashboard-zone.fsm

.


Jordan Johnson
Principal Software Engineer
>

0 Likes
Message 5 of 5

Jacob_Gillespie
Autodesk
Autodesk

@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