question

Hai L2 avatar image
1 Like"
Hai L2 asked Hai L2 commented

Using Labels vs. global table for 20+ variables?

When I need to track 20+ variables, is it better to use labels or a global table to track them? Ultimately, the data is written into the global table after the 500 steps activity is completed.

Is there a performance hit for having too many labels?

Is it worse than writing to the global table too often?

Thanks,

Hai

FlexSim 20.1.2
flexsim 20.1.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.

1 Answer

Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Hai L2 commented
Models are rarely slow because of the number of labels on an object or the number of times you write to a table. It seems unlikely that one approach over the other will be noticeably different. Most models have hundreds or thousands of items or tokens, all of which have 20+ labels, and it is not a problem. Many models also write to global tables thousands of times without noticing a speed difference. Usually, writing values, either to a label or to a table, is a very tiny percentage of what the CPU needs to do to run a simulation.
· 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.

Hai L2 avatar image Hai L2 commented ·

Thank you.. without knowing the internal, it is hard for me to guess which is better. Thanks!

0 Likes 0 ·