Reputation: 75
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.
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:
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
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