question

Raul Vazquez avatar image
0 Likes"
Raul Vazquez asked Raul Vazquez commented

Tracked variable minimun exception for 0

Hi team,


Im creating a tracked variable in order to track content,max,avg and minimun individually per object and when i tried to get the minimum always is 0. there is a way that the tracked variable provide a the second lower value? could i get the second minimum value? is possible to do it without use the warmup time?

The code below is how I create the variable at reset for several objects using "usercommands" on reset.

treenode labelNode=current.labels.assert("ItemQty");
TrackedVariable.init(labelNode,STAT_TYPE_LEVEL,0);

thanks a lot


FlexSim 20.1.3
flexsim 20.1.3tracked 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

·
Mischa Spelt avatar image
0 Likes"
Mischa Spelt answered Raul Vazquez commented

That 0 that you pass in as the third argument to TrackedVariable.init is the start value. If you initialize it to 0 and only set it to higher values afterwards, the minimum will be 0. If that's not what you want, you should make sure it starts at a higher value.

· 1
5 |100000

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

Raul Vazquez avatar image Raul Vazquez commented ·

Thanks Mischa

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.