attached is a model that simulates traffic in regular conditions and in time of crisis.
the crisis means the population is evacuating itself from north to south.
It’s not complex in any way at the moment, simply cars, truck and mobilized units driving on roads at various maximal speeds.
there are 3 scenarios –
Routine: only trucks and cars. traffic to both directions.
Panic: cars, trucks and mobilizers. Most of the traffic is from north to south.
Panic_6_down: part of route 6 is closed due to bombings (see in red). cars, trucks and mobilizers. Most of the traffic is from north to south.
I’m sure that the simulation stops has something to do with the number of MUs, but I’m not sure why it happens, and why the simulation stops at different times in each run (could be related to the normal distrobution in the Sources) - the drains should always be capable of receiving additional MUs, so it most there should only be a delay…
Any ideas? Comments? Suggestions?
Thanks in advance,
when you look into the event debugger you can see that a distance event is continously triggered.
In the distance control of your MUs you set the speed to zero once the distance is below the limit.
Because of this the distance is immediately above the limit, the control is called again and you set the speed back to the original speed. This causes then an endless loop.
You could add a wait statement in the distance control where you wait for some seconds before you set the speed back to the original speed.
you did it Ralph!
i added a wait of 2 seconds as recommended and now the model works!
i guess i didn't fully understand the distance function...
Thanks for the quick help!