question

Mischa Spelt avatar image
0 Likes"
Mischa Spelt asked Jacob Gillespie answered

How to plot Tracked Variable label?

Hi. I have a label which is initialized as a Tracked Variable at the start of my model. I would like to see a time vs label value plot of this label. How can I do this? If I use the "pin" button in the labels panel, I get a chart without a Statistics Collector. When I tried to create my own statistics collector to listen to the On Change event of the label, it did not collect any data.

Thanks.

Edit: Added a demo model.

FlexSim 17.2.1
labelsstatistics collectorchartstracked variables
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

·
Jacob Gillespie avatar image
2 Likes"
Jacob Gillespie answered

The problem here is that you are initializing the label on reset.

The Statistics Collector is binding to the event of the Tracked Variable before it is initialized.

Another problem I found was that your On exit activity was actually listening to OnEntry.

I also used a trick where I made the Row Value an array to record the OldValue and the NewValue with each event so that it would match the Content vs Time chart.

plottrackedvariablelabel-edit.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.

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.