question

Helen avatar image
0 Likes"
Helen asked Helen commented

Tracked variables

Hello,

I'm using tracked variables in a model and I've realized that they restart when the warm-up period arrives. Is there any way to avoid this?

Thank you!
Myriam

FlexSim 22.1.0
tracked 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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Helen commented

You can store the nodes of the variable as a copy somewhere else before the warmup time ends. Then after this event you transfer the nodes back.

EDIT: Thanks for pointing this out. @Mischa Spelt

The warmup mechanism has not got an exclusion feature or a mapping of options.

A static method named init(…) has the ability to exclude resetting values from warmup option by setting a flag called: STAT_IGNORE_WARMUP

the tracked variable will ignore the resetstats() command. Use this option only if the tracked variable should keep the data collected during warmup time.

· 5
5 |100000

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

Mischa Spelt avatar image Mischa Spelt commented ·

The warmup mechanism has not got an exclusion feature or a mapping of options.

But Tracked Variables can have a STAT_IGNORE_WARMUP flag, right?

1 Like 1 ·
Joerg Vogel avatar image Joerg Vogel Mischa Spelt commented ·
@Mischa Spelt, you are right. It is a valid flag option in FlexScript Class Reference API.
0 Likes 0 ·
Helen avatar image Helen Mischa Spelt commented ·

Oh that's awesome. Thanks @Mischa Spelt and @Joerg Vogel .

I guess this is the code that I need to use. 1649231187667.png

But I'm not sure where do I have to introduce it. Can you help me with this?

Thank you! )

Myriam

0 Likes 0 ·
1649231187667.png (30.0 KiB)
Joerg Vogel avatar image Joerg Vogel Helen commented ·

tracked-variable-warmup-ignore.jpgtracked_variable_warmup_ignore.fsm

I executed the init line from a script window. Then the flag has been set and it will be kept set all time until it get erased by bit logic operation. If you dont have access to a script console, execute the code line once from a trigger or custom source code activity in process flow. Please compare entries of trackedvariable1 and 2. The time is not reset by warmup time. I'm not aware of an option to update time on warmup, too.

TrackedVariable.init(TrackedVariable("TrackedVariable1"),
STAT_TYPE_TIME_SERIES,0,STAT_USE_HISTORY | STAT_IGNORE_WARMUP) 

I write same values for both tracked variable on exit trigger to them.

1 Like 1 ·
Show more comments

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.