question

Patrick Cloutier avatar image
0 Likes"
Patrick Cloutier asked Ryan Clark commented

How to measure number of people in a designated area?

In the attach sample model I try to measure how many people are in the red corridor VS time.

I added a bogus object (scale) at each end of the corridor to mark them in the Process Flow and use Zone Statistics. But zone Statistics does not seem to work. Why?

Also, is there any way of doing this without the bogus objects?

I know I could manually count when people arrive at the object and write the info in a table but the Zone Stats seemed the right tool for the job.

Thanks,

measure-corridor-occupation.fsm

FlexSim 18.1.1
people modulezone statistics
5 |100000

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

Joshua S avatar image
0 Likes"
Joshua S answered Patrick Cloutier commented

Since the Patient Track is an instance process flow, there isn't a single zone created, but a zone created every time a person/instance of it is created, so you cannot use zoning in this case that I am aware of. I was able to track the amount of people by adding a custom codes when they enter and leave the red corridor that increments and decrements a tracked variable "People" which I was able to pull statistics out of it, it does struggle with a good people over time exactly because it checks when the value changes only. Hope this helps.12139-measure-corridor-occupation-change.fsm


· 17
5 |100000

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

Patrick Cloutier avatar image Patrick Cloutier commented ·

What if I use a normal process flow instead of instance process Flow? The absolute only reason why I'm using an instance process flow is because that's how it is done in the people module tutorial. But I don't know why to be honest.

Thanks,

0 Likes 0 ·
Matthew Gillespie avatar image Matthew Gillespie ♦♦ Patrick Cloutier commented ·

First of all, this is a bug with the way we store shared assets for instanced flows. We've fixed this in 18.2 and then this model should work great if you set the zone to be global (one zone per all patients).

For this model you'd be fine using a general flow. We're using instanced flows because it lets each patient be their own instance which provides several benefits:

1. You can use local resources. This way you can simulate a patient needing a bunch of labs, but you only want one lab done at a time. Within the instanced flow you could create a bunch of tokens, one per lab, and then they have to acquire a resource before performing the lab. If the resource were global only one lab in the entire model could happen at a time instead of one lab per patient.

2. You can view each instance separately. Click on a patient in the 3D view and in the Process Flow Properties panel hit the Open Process Flow View button. Now you can see the Process Flow for just that one patient. You won't see the tokens of any other patients.

3. We'll be customizing the instanced flow more in future releases to make a better Patient Track. For example, the plan is to substitute patient for current, so you can refer to the patient as patient. This will be a lot nicer than typing token.Patient in a general flow.

1 Like 1 ·
Patrick Cloutier avatar image Patrick Cloutier commented ·

Sorry for the long comment but this doesn't work.

I just found a important problem with the solution described above. My model is not just an origin, a destination and a corridor. It is 20 origins, 20 destinations and 6 corridors. The model creates the persons at their origin and tells them to walk to their destinations. They automatically (Astar) use a combination of corridors depending on their respective origin and destination. So for example, people going from point 5 to point 13 use corridors 2 and 3. I don't have to tell them to use corridors 2 and 3. They just do so because of the layout and Astar.

All this works perfectly.

Except that I need stats on each corridor occupation during the day. For the solution above to work, I would need to create bogus entry points to each corridor and manually route each patient through each of those entry points with the Process Flow just so I can calculate how many are in each corridor at any time. I can do it put it is far from an elegant solution.

So I was hoping that there would be a way to physically detect when a person enters a certain zone in the model. Not the Process Flow but the 3D view. Could I place objects or barriers that could trigger code when a person walks over it?

Thanks a lot,

0 Likes 0 ·
Joshua S avatar image Joshua S Patrick Cloutier commented ·

@Patrick Cloutier Let me know if this is what you are looking for and I can make more adjustments to it so it can be more easily adapted to your model. You can duplicate and create as many corridors as you want making them as big as you want in this example. This model uses custom code to compare the position of the people in relation to the 3D space of the corridors and counts how many people are in each corridor dynamically. corridor-count.fsm

1 Like 1 ·
corridor-count.fsm (30.5 KiB)
Patrick Cloutier avatar image Patrick Cloutier Joshua S commented ·

Wow. I'm impressed. Bravo! I will spend time understanding how it works and how to adapt it to my model.

I assume it will work just as well with people walking from queue2 to queue1 at the same time?

0 Likes 0 ·
Show more comments
Karen Measells avatar image
0 Likes"
Karen Measells answered Ryan Clark commented

Could this response be updated for the HC 2022 version?

Thanks!

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

Ryan Clark avatar image Ryan Clark commented ·

Hi @Karen Measells,

Please post this question separately to keep things organized on this forum. You can link back to this question if that will be helpful in addressing your question. See Best practices for using this Answers site - FlexSim Community for more info. Thanks!

0 Likes 0 ·