How to Create a real time traffic for VANET using OpenStreetMap and SUMO in NS2?

Prerequisites to create real time traffic using SUMO and OpenStreetMap

SUMO 0.22.0

Use to download map


 Real time traffic Creation for VANET

Select the map that need to simulate and export it.After exporting the map,download and save the file.

Road network:

netconvert imports the road network stored in “map.osm” and stores the SUMO-network generated from this data into “” from this data into “”
Netconvert –osm-files map.osm -o

Copy the typemap.xml file and file

Click copy the typemap file and save it to your working directory with the name typemap.xml

Copy the file from sumo-0.22.0/tools in working directory

Node Creation

polyconvert –net-file –osm-files map.osm –type-file typemap.xml -o map.poly.xml

python /home/kunal/sumo-0.22.0/tools/trip/ -n -e 100 -l

python /home/kunal/sumo-0.22.0/tools/trip/ -n -r map.rou.xml -e 100 -l

File Configuration

Now need to make a sumo.cfg file to view the map using sumo-gui.

Now save the above file with a file name. I saved it with map.sumo.cfg

Now run the following command from terminal

sumo-gui map.sumo.cfg


 Real time traffic Creation for VANET

After entering the command, sumo GUI window will pop out.