Docsity

steps for setting up simulations with sumo, Lab Reports of Traffic Control and Regulation

Toggle sidebar
bg1
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.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download steps for setting up simulations with sumo and more Lab Reports Traffic Control and Regulation in PDF only on Docsity!

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.
  1. Open command prompt and change directory to SUMO binary folder ( <SUMO_HOME>
    bin
    )
  2. 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
  1. 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
  2. On successful execution of the above command a map.poly.xml file will get created in the output directory.
  1. 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".
  2. Upon successful execution of the command map.rou.alt.xml and map.rou.xml files will get created in the output directory.
  1. To configure SUMO for better visualization of the network that we have modelled, 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.
  1. 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.

Windows Note If you have installed SUMO via the windows .msi installer file, this is done automatically.

  1. On the Windows search box (on the Taskbar) search for environment. The best match result should be the "Edit the system environment variables" option. Open it.
  2. A small window should appear. Under user variables select PATH (or Path - Windows environment variables are case insensitive) and click Edit. If no such variable exists you

must create it with the New -Button

  1. Append; C:\Program Files\sumo-1.6.0\bin to the end of the PATH value (don't delete the existing values!)
  2. Under user variables now select SUMO_HOME and click Edit. If no such variable exists you must create it with the New -Button
  3. Set C:\Program Files\sumo-1.6.0 as the value of the SUMO_HOME variable Note Replace C:\Program Files\sumo-1.6.0\ with your sumo directory. C:\Users\ENGR KONYEHA>cd.. C:\Users>cd.. C:>cd "C:\Users\Engr. Konyeha\Documents\sumo simulation\traffic\bin" C:\Users\Engr. Konyeha\Documents\sumo simulation\traffic\bin>netconvert --osm-files map_30.6.20.osm -o map_30.6.20.net.xml" Warning: Environment variable SUMO_HOME is not set, using built in type maps. Warning: Environment variable SUMO_HOME is not set, schema resolution will use slow website lookups. Error: unable to open file 'https://sumo.dlr.de/xsd/types_file.xsd'