maximum agents staying in one waiting area & Poisson Distribution

All topics related to questions in Pedestrian Dynamics
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

I would like to ask some questions.

Would I know how to set the maximum agents staying in one waiting area?

Also, I would like to use Poisson Distribution in generating agents.Is it possible for me to do these?

Many thanks.
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

Would I know what does the following errors mean?
I would not run the experiment. Thanks.

1 GUIControl '1' not found!
2 GUIControl '1' not found!
3 GUIControl '1' not found!
4 GUIControl '1' not found!
5 GUIControl '1' not found!
6 GUIControl '1' not found!
7 GUIControl 'SMP1' not found!
8 GUIControl 'SMP1' not found!
9 GUIControl 'SMP1' not found!
10 GUIControl 'SMP1' not found!
11 GUIControl 'SMP1' not found!
12 GUIControl 'SMP1' not found!
13 GUIControl 'VarDefault' not found!
User avatar
Ignasi Echaniz
Posts: 18
Joined: Monday 28 May, 2018 - 10:44

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Ignasi Echaniz »

Hi Mona_Hung,

Thanks a lot for your post.

There are several ways to define a “capacity” of a waiting area (or any activity):
  • If you are using the activity with an indicative corridor, you can define the capacity in the stop condition of the indicative corridor (GUI indicative corridor). Then agents will queue in the indicative corridor before using the waiting area if it is full.
  • If you are using the activity with server queues, you can define the capacity with the number of server queues and server queue capacity (GUI activity).
  • If you want to assign agents according to the capacity, you can use user defined codes in the location assignment of the activity (agent input--> Activities).
If I understand correctly, you would like to generate agents using a arrival distribution following the Poison distribution. To do that, you should use a uniform distribution. If I am not mistaken, for a Poisson process, the times in-between events follow an exponential distribution. If you pick a time window, the count of events, n, follows a Poisson distribution. Then, given n the time of events follows a uniform distribution. Therefore, I recommend you to create all agents at time 0 (agent generation GUI), and then set the repetitive mode of the generator to No Repeat, and give a delay time of Uniform(min value time, max value time). That will give an individual delay for each agent following a uniform distribution.

In order to provide a more detailed answer for your last post (errors), I would like to see your model. Could you please upload it? Usually this errors refers to wrong references at GUI’s.

Kind regards,
Ignasi Echaniz
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

Dear Ignasi Echaniz,

Thanks for your quick response.

Where would I upload the model?

Actually I would not create the indicative corridor or queue with "Ctrl + Left Click". So, I tried to create many waiting areas. Is it not practical to do this? It seems that I would not control the capacity of the waiting area and the stay time.
I wish to make the following happen:
- every agent will go into a waiting area after they entry and before they exit
- agents will randomly going to different waiting areas
- the staying time of every agent is randomly between 1 min to 5 mins
- the maximum capacity of a waiting area is 4 agents

Thanks for your help again.

Yours gratefully,
Mona
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

Besides, for the Poisson Distribution, I wish to generate agents with the following rules:
- agents entry the model randomly with different time and entrances in every 5 minutes
- the number of agents generated in every 5 minutes would followed the Poisson Distribution with a mean of 30.423


The goals of this model are calculating the occupancy percentage of the waiting areas. I wish to experiment will the situation become better if there are changes with the number of waiting areas. I used the waiting areas to represent the chairs in reality.

Thanks a lot. I know that I raised a lot of problems.
User avatar
Ignasi Echaniz
Posts: 18
Joined: Monday 28 May, 2018 - 10:44

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Ignasi Echaniz »

Hi Mona_Hung,

No problem, we are here to help you :).

You can attach model in your posts. To do so, please add the file in the bottom tab (attachments) while writing comments.

What you want to do is perfectly possible in Pedestrian Dynamics. However, the easiest and simplest way to do so is with an indicative corridor (please see the attached model). Agents enter the model and go to the indicative corridor. There they will choose a random connected waiting area if there are spots available. When all waiting areas are full (4 agents), agents will queue in the indicative corridor. In order to set the staying time, you need to set an activity time at all waiting areas. The capacity of the waiting areas is set in the indicative corridor stop condition (GUI). If you do not want to use the indicative corridor, you will need to code yourself in the location assignment of the waiting area (agent input Activities). There exist predefined user codes such as assigning activities according to the capacity of activities. However, you will need to specify yourself what happens if all activities are full (skip, wait etc). That’s why I recommend the first option.

Regarding the Poisson distribution, I suggest you to create a repetitive generator every 5 min, where you generate X number of agents according to your Poisson distribution. Finally you give a random delay of 5 min to the generated agents. You can see all those settings in the model I have attached in this post.

Finally, while doing experiments you will be able to check the content of activities over time. From there you will be able to accurately calculate the occupancy percentage of your waiting areas.

Please let me know if everything is clear enough and if you have further doubts.

Best Regards,
Ignasi Echaniz
Attachments
Poisson + Capacity in activity location.mod
Example Model
(154.57 KiB) Downloaded 65 times
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

Thanks for your kind reply.

I would not create the indicative corridor by myself. Generally, I build every thing in the model by "Ctrl & left clicking" and stop the building action by "Ctrl & left clicking". However, the corridor is built by "Ctrl & left clicking" but it won't stop. What should I do to let the software know that I have finish the design? Please refer to the attached photo which shows the situation that I face whenever I want to build an indicative corridor. The action just would not be stopped.

Also, I tried to set the waiting time of the waiting area like the following:
{**Uniformly (min) distributed between e1 and e2**} mins(Uniform(1, 5))

Is it correct for agents stay there randomly from 1 to 5 minutes?

Thanks for your help.
Attachments
capture01.jpg
capture01.jpg (109.7 KiB) Viewed 2165 times
Mona_Hung
Posts: 10
Joined: Wednesday 17 October, 2018 - 11:25

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Mona_Hung »

About the Poisson distribution, is it possible that the number of agents are generated by Pedestrian Dynamics followed the Poisson distribution if I only provide the parameter of the Poisson distribution? I wish the experiment would by conducted if I only provide the parameter and it would generate many times itself.

I tried to attach two models that I would not do the experiment. Please kindly take a look for me.

Yours gratefully,
Mona
User avatar
Ignasi Echaniz
Posts: 18
Joined: Monday 28 May, 2018 - 10:44

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Ignasi Echaniz »

Hi Mona_Hung,

You should finish the design of an indicative corridor by clicking “Ctrl & SHIFT & left clicking”. You actually need to use this keyboard/mouse combination to finish editing any polyline or polygon at any modelling object (obstacle, walkable areas etc..).

Indeed using mins(Uniform(1, 5)) at the activity time of an activity will make agents stay in that specific activity randomly from 1 to 5 minutes. The code mins(uniform(1,5)) is actually the same as doing Uniform(mins(1),mins(5)).

Best Regards,
Ignasi Echaniz
User avatar
Ignasi Echaniz
Posts: 18
Joined: Monday 28 May, 2018 - 10:44

Re: maximum agents staying in one waiting area & Poisson Distribution

Post by Ignasi Echaniz »

Hi Mona_Hung,

Thanks for your post.

I believe your models where not successfully attached. Can you tried again?

I am sorry but I do not understand what your problem/challenge is. Do you mean that you want to run several experiments with the same parameter? If so, then you should use the experiment wizard. For more info about the experiment wizard please check one chapter of our video tutorials that helps user to set up multiple experiments (https://www.youtube.com/watch?v=an8eJM8 ... zgPFH1MwIN)

If I did not understand you correctly, could you please me give more details of what you want to achieve :).

Best regards,

Ignasi Echaniz
Post Reply