How do I count the number of item from source?

How do I count the number of item from source?

samantha_y
Not applicable
42 Views
1 Reply
Message 1 of 2

How do I count the number of item from source?

samantha_y
Not applicable

[ FlexSim 17.0.12 ]

I am simulating visitors arriving a park, and I would like to see how the park will look like when n people were arrived the park. How can I get the number of visitors come out from the source?

Like the following picture:

10909-screen-shot-2018-03-06-at-141018.png

The above picture, "Customer_239" is the 239th customers coming from the source, how can I get this number? Thanks.

P.S. I am using flexsim 2017.0.5

0 Likes
Accepted solutions (1)
43 Views
1 Reply
Reply (1)
Message 2 of 2

mischa_spelt
Advisor
Advisor
Accepted solution

You can use the On Creation or On Exit trigger of the source to create a label when the people are created, based on the total output so far.

10911-customerindextrigger.png

In these fields, item refers to the created or exiting flow item, and current refers to the source itself. I hope it's fairly obvious what current.stats.output.count then does, the only thing to keep in mind is that the flow item has not yet exited the source at the point the label is assigned, so for the first flow item the output count will still be 0 - hence the + 1.