question

Joey A avatar image
0 Likes"
Joey A asked Jason Lightfoot commented

Zone getstat not working

Hi,

I tried an answer form the flexsim community on how to count the number of tokens in my zone. It told me to use this code in the script (or decide activity): getstat(getactivity("Zone"), "Content", STAT_CURRENT) (link to question is here...https://answers.flexsim.com/questions/74314/reading-number-of-tokens-in-the-zone.html

Note: the link says to have type it this way but my script errored out: getstat(getactivity(processFlow,"Zone"), "Content", STAT_CURRENT). I could only get a value if i used the code in my first paragraph


However it keeps giving me a ridiculously high number (340282346638528859811704183484516925440.00).

Do you know what I'm doing wrong?

Joey

Zone count Help.fsm

FlexSim 23.0.5
zonezone statisticsgetstat
zone-count-help.fsm (46.8 KiB)
· 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.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered Jason Lightfoot commented

Use:

  1. getstat(getactivity("ProcessFlow","Zone"), "Content", STAT_CURRENT)
· 6
5 |100000

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