Week 3 & 4 Blog

Hi all,

This week I tried to import San Jose City map in SUMO software and ran the simulation.
The steps followed to do this is explained below -

Assuming that you have already installed SUMO, Python 2.7.x and Notepad++

1. Downloading the map from Open Street Map - Open Street Map contains the world map, free to use under an open license. In the search bar type San Jose and select the area you want to simulate in SUMO. After selecting the area click on the export button then you get different links from which you can download the city map, select any one of the links to download the map instead of again clicking export which usually fails. But, if you are a person who thinks why should I listen to this guy then you can go ahead and try your luck by clicking the export option. Now, save the .osm file as map.osm.


2. Copying the Code and pasting and modifying in Notepad - http://sumo.dlr.de/wiki/Networks/Import/OpenStreetMap  In this link go to Importing Additional Polygons and copy the whole code and paste it in notepad++. Then from notepad++ remove line 34 which contains power and save it as typemap.xml.


3. Open CMD and type the commands as given below -
The directory should be where ever the map.osm file is downloaded or you can copy the .osm file into a folder of your interest. But, where the .osm file is the rest of the files required to run SUMO should be present.

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

python whereyousavedSUMO/sumo-0.30.0/tools/trip/randomTrips.py -n map.net.xml -e 100 -l
python whereyousavedSUMO/sumo-0.30.0/tools/trip/randomTrips.py -n map.net.xml -r map.rou.xml -e 100 -l

4. Modify test.sumo.cfg file -  Search inside the SUMO directory and once you find it copy the file and paste it in the location where map.net.xml, map.rou.xml and map.poly.xml are present. Now, modify the name of the test.sumo.cfg into map.sumo.cfg. And open the file in notepad++ and modify them in the following order -
line 6 - replace net.net.xml to map.net.xml
line 7 - replace input_routes.rou.xml to map.rou.xml
line 8 - replace pois.poi.xml,e3_detectors.xml to map.poly.xml



5. To open SUMO application with the San Jose City Map - Now in CMD after the present directory please type - sumo-gui map.sumo.cfg and the SUMO application along with the San Jose city map should be opened.

 







Comments

Popular posts from this blog

Week 2 Blog

week-6 Blog