Simulation and exchange of accident alert in a OpenStreetMap

I need to simulate the scenario which is given below but i have no idea how to simulate it as i am newbie. In scenario i have to make VANET (Vehicular Ad-Hoc Network) so that vehicles can share accidental info with each other . Please read scenario and give your suggestion.

a.) Let’s say that i have an Open Street Map in which it will have a moving vehicles.

b.) When vehicles collide with each other, i have to detect the collision/accident and then transmit that collision information to other vehicles in a network making a Vehicular Ad-Hoc Network with or with RSU.

c.) Transmitted information to other vehicles includes coordinates of accidental location.

So, please help me that how can i simulate the above described scenario. Guide me please!!!

Hi and welcome to OSM and the forum

OSM is a database, a collection of nodes with latitude and longitude and other information. That’s it. You can use OSM to determine what kind of node is in my close surroundings. All other tasks in your project OSM can’t help you.

I would want to simulate the moving vehicles as colored rectangles driving along the roads shown on the map. So, I’d try to extract the road network and find a data structure that allows to calculate possible ways. I think this work is already done, see e.g. www.brouter.de.
As a first approach for the simulation of the movement you might randomly calculate a start and end position on the road network, calculate the route between and create a object moving on this route with a constant speed. If you have multiple objects moving like that you just have to wait for the collisions :wink:
For a more realistic simulation of moving vehicles you’d want to slow down at crossings or when nearing other vehicles. This is all about detection of collisions, search stackoverflow for details.

Have you seen SUMO (Simulation of Urban MObility) ?

It has some V2X simulation under development.

Maybe some more hints are at https://wiki.openstreetmap.org/wiki/Simulators ?