Applicable Versions | NetSim Standard | NetSim Pro |
Applicable Releases | v10 | v11 | v12 | v13 |
NetSim map view supports OpenStreetMaps which provides free editable maps of the world. Road traffic conditions can be modeled conveniently in Simulation of Urban Mobility(SUMO) which is an Open Source traffic simulation software.
Steps for setting up SUMO:
1. Download the open street map file (.osm) for the region over which you prefer to perform VANET simulations. Use the link https://www.openstreetmap.org/export for this purpose. Use the search text box to search for specific locations in map and use the Export button to download the map.osm file.
2. Create a new folder and place map.osm file in it.
3. Open command prompt and change directory to SUMO binary folder (<SUMO_HOME>\bin)
Note: In this example, we have used SUMO 0.25. For latest versions of Netsim, SUMO path will be (<programfiles(x86)<Eclipse<SUMO<bin)
4. Using netconvert utility in SUMO convert the map.osm file to an equivalent map.net.xml network file using the command:
netconvert --osm-files map.osm -o map.net.xml
5. On successful execution of the command map.net.xml file will get created in the output directory specified.
6. To interpret the OSM-data an additional typemap-file is required. The sample file osmPolyconvert.typ.xml which is present in "<SUMO_HOME>\data\typemap" can be reused for this purpose. Copy osmPolyconvert.typ.xml to the output directory containing map.net.xml and map.osm files.
7. Using the typemap file typemap.xml import polygons from OSM-data to produce a Sumo-polygon file with the POLYCONVERT utility. Use the following command:
polyconvert --net-file map.net.xml --osm-files map.osm --type-file typemap.xml -o map.poly.xml
8. On successful execution of the above command a map.poly.xml file will get created in the output directory.
9. Now for the network that we have created, random trips can be easily generated using randomtrips.py that is available in "<SUMO_HOME>/tools" directory. Use the followiing command to generate random trips for 10 vehicles.
randomTrips.py -r map.rou.xml -n map.net.xml -e 10
For executing the command change directory to "<SUMO_HOME>/tools".
10. Upon successful execution of the command map.rou.alt.xml and map.rou.xml files will get created in the output directory.
11. In the map.rou.xml file contains the vehicle definitions, the id and the routes the vehicles will take. The vehicle id's are by default numbers which start from 0.
12. Rename vehicle names to avoid conflict with NetSim. Vehicle names can be renamed to V1, V2, V3 etc preferably so that the same names can be assigned to the devices in NetSim.
13. To configure SUMO for better visualization of the network that we have modeled, create a SUMO GUI settings file file.settings.xml. Here user can specify the zoom level, the X and Y coordinate to be centered while opening the network, the delay etc. Set your prefered x, y, zoom and delay values and save. Place the file in the same directory along with the previously generated files.
14. Create a SUMO configuration file (sumo.cfg) which is required to load the network in SUMO-GUI. This file contains the path of the other files related to the network. Place the file in the same directory along with the previously generated files.
15. The map.sumo.cfg file can be used to load the road traffic network that we have created, in SUMO-GUI.
16. The map.sumo.cfg can be renamed to Configuration.sumo.cfg and can be loaded in NetSim GUI using VANET module.
For further reference and documentation related to SUMO visit: http://sumo.sourceforge.net/userdoc/