Shariff Ghanem
Shariff Ghanem

Reputation: 75

How to stop arrival rate from source in anylogic?

My current fire evacuation simulation model begins when I push a button which triggers the fire alarm. I would like to stop pedestrians from arriving during the evacuation process.

Below is my flow chart: enter image description here

For example I want to stop pedestrians from source pedOffice from arriving the building area after I push the Fire Alarm Button. Below is my properties settings: enter image description here

I have tried using the code pedOffice.set_rate(0); But the pedestrians continue to arrive after the button has been pressed.

Upvotes: 2

Views: 740

Answers (1)

Felipe
Felipe

Reputation: 9376

There are 2 options for this:

Option 1 You need to first change the type of arrival to rate, otherwise set_rate has no effect:

pedOffice.set_arrivalType(pedOffice.RATE);
pedOffice.set_rate(0);

Option 2
You can change the maximum number of arrivals to the amount that has arrived:

pedOffice.set_maxArrivals(pedOffice.countPeds());

Upvotes: 4

Related Questions