question

Joerg Vogel avatar image
0 Likes"
Joerg Vogel asked Jordan Johnson answered

trackedvariable history node is missing in the 2nd run after creation

I have added a tracked variable as Level type. Then I write in an user event the output of the last 10 minutes of a queue as the value to the tracked variable. In the first run I can see the entries in a history node. If I stop, reset and run the model again, I am missing the history node in the tree. How can I get the node back or how can I see the entries of the tracked variable?

First run model tree view:

Second run model tree view:

tracked-variable-content-history-deleted.fsm

FlexSim 18.0.2
trackedvariablehistoryview entries
· 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.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·

How did you add the tracked variable? Did you use the Tracked Variable's init method?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Jordan Johnson ♦♦ commented ·

I have added the tracked variable at the tool box.

0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

This is a bug in the interface that makes new TrackedVariables. We'll make sure to fix that bug.

For now, you will need to use the script window to properly initialize your Tracked Variable (on a blank node):

TrackedVariable.init(model().find("Tools/TrackedVariables/MyNewTrackedVar"), STAT_TYPE_CUMULATIVE, 0, STAT_USE_HISTORY)

This will properly add the history so that it is not destroyed on reset.

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.