Search code examples
anylogic

How to simulate crash of cars and pedestrians in anylogic


I'm working on a simulation of a zone evacuation, where all agents try to exit the zone once I press a button. However, I'm struggling with the issue of pedestrians colliding with cars or getting hit by them, The main issue is that pedestrians are passing through the cars, i need to sink when they crash or stop the cars in the time they crash. I would greatly appreciate any suggestions or guidance on how to tackle this issue, or if there is another approach I should consider. Thank you in advance

I have tried creating roads and making agents move in different directions, but regardless of what I do, they still don't collide with each other.


Solution

  • They will never, the 2 libraries are not designed to "interact" with each other.

    However, AnyLogic being infinitely flexible, you can make them. You need to give peds and cars "eyes" that regularly scan the environment themselves...

    Here is an example model demo-ing the approach. I describe how to get there in this blog post.