question

Joe Hugan avatar image
0 Likes"
Joe Hugan asked Regan Blackett commented

Accessing Zone Content

What is the syntax to access the content (number of tokens) of a process flow zone? I do not need partitions or subset level detail. Just the number of tokens in the zone to make specific decisions.

FlexSim 18.0.3
zonesyntax
5 |100000

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

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered tannerp commented
@Joe Hugan

I wasn't able to get what @Sam Stubbs suggested to work. Attached is a sample model using a Process Flow variable called "InZone". In the PF, I reference the same variable two different ways in the "Decide" blocks. I'm sure there is a better way, so please make suggestions of maybe how to do this more easily.

Thanks,

pf-variable-jn1.fsm


pf-variable-jn1.fsm (21.6 KiB)
5 |100000

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

Sam Stubbs avatar image
1 Like"
Sam Stubbs answered Regan Blackett commented

I believe you can use the "getstat" command, followed by the "getactivity" command to get a reference to the Zone inside your process flow. It's a little long but it should be something like this:


getstat(getactivity(processFlow, "Zone"), "Content", STAT_CURRENT, current)

Obviously "Zone" will be whatever the name of your Zone is.

· 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.

Regan Blackett avatar image Regan Blackett ♦ commented ·

What Sam Said but I'd grab it in a Label like this:

Assign Label activity > Get Activity Stat and reference your Zone with the Sampler. Your token will then have a label on it that shows the Zone content at the time your token did this activity.

0 Likes 0 ·
act-stat.png (25.6 KiB)