Skip to content

A demo project for a simple traffic simulation, covering the topics of the Manual network creation, OSM maps to network generation, and defining of the origin to destination matrices.

Notifications You must be signed in to change notification settings

dinesht27/Sumo_Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sumo – A demo project for a simple traffic simulation, covering the topics of the Manual network creation, OSM maps to network generation, and defining of the origin to destination matrices. This work and study are done in reference to the lecture and study material covered by the Research Associate-Lecturer Dr. Rodrigue Tchamna [1] [2]. This part of demo project is summarized into three parts.

  1. Part 1 - Definition of nodes, edges, assigning vehicle attributes and defining routes.
 In this section the path or the network is manually generated by defining nodes and edges. The files mentioned in the following steps are found in the folder Manual.
 
 	Step 1 – Defining the nodes, which could also be interpreted as the junctions of the road or the path shown in Figure1.
 ![image](https://github.com/dinesht27/Sumo_Demo/assets/56340161/75cd91f2-544a-4d91-81cc-83adbb73d632)

 File name - my_nodes.nod.xml Type - .nod.xml
 
 	Step 2 – Is to generate the tag scripts to connect the nodes together to form the links or the pathways. Which is also shown in the figure 1.
 
 File name – my_edge.edg Type - .edg.xml
 
 Here, in the script defined is the nodes from which it starts and ends. And the id defines the identification name of the edge. And for the ‘type’ definition in the script (ex – 3L45) Here the L defines the lanes and 45 defines the maximum speed.
  
 	Step 3 – Creation of the type file. Here the type file is created with the id which is already defined in the edge file (ex – 3L45). This the properties of the road are defined like the number of lanes exists, the maximum speed of that lane, which lanes has priority, etc.
 
 File name – my_type.type.xml Type - .type.xml.
 
 	Step 4 – This is the step of assembling all the file together defining the nodes, edges and types. This combination is converted into a network file.
 
 File name – my_net.net.xml Type - .net.xml
 
 Here used is the netconvert command which is used to generate the network file.
 
 	Step 5 – Until now defined are the physical network with edges, types etc, for creating the pathway. It is important to define the vehicle attributes such as the length, type, speed of the vehicle, etc. along with the route which it has to follow. In this step create the route of the vehicle along with all its attributes.
 
 File name – my_route.rou.xml Type – .rou.xml.

 	Step 6 – This is the final step where we build the configuration file for the sumo with inputs of the network and the route data along with defining the parameters required for the simulation in SUMO.

 File name - my_config_file.sumocfg Type - .sumocfg
 The gif file for the simulation for this part 1 scenario is created and could be found in the GIF folder under the name Manual.gif.
  1. Part 2 – The part 1 defines the general method or the steps for simulating the network and the route. Here in Part 2 the network is directly derived from the OSM (Open Street map).
 ![image](https://github.com/dinesht27/Sumo_Demo/assets/56340161/72299803-e788-4798-bf03-258c9e0fc5b0)
 
 In figure 2 shown is the OSM, of the city centre in Deggendorf. Since building a map manually of such places with huge set network is not possible. In this part of the work the .osm file for the place
  
 Deggendorf city centre is downloaded using the OpenStreetMap, and then is converted into the network format (.net.xml) as discussed already in the step 4, part1. The generated network files consist of all the data attributes of the nodes, edges, lanes, etc. for the selected region of Deggendorf.
 
 In this part we also use the randomTrips.py file which is also a part of the sumo library for generating the route for this simulation. This "randomTrips.py" [4] is used for generating a set of random trips for the obtained network file. Using this file generates the trips randomly or uniformly, by selecting the source and destination, and here could be defined the end time simulation, edge length, lanes etc. This python code calls the python script and the Deggendorf network file to generate the route file for the random trips in the simulation.
 
 The Step 6 from part 1 is again repeated with the inputs of the network and the route got the Sumo simulation configuration.
 
 File Name for the OSM file - Deggendorf.osm
 File Name for the network file - deggendorf.net.xml File Name for the Route file - deggendorf.rou.xml
 
 The Simulation of the Part 2 scenario could be found as a gif file in the folder GIF under the name Random.gif.
 ![image](https://github.com/dinesht27/Sumo_Demo/assets/56340161/ccbb97dd-68ef-4356-af82-d821050c4389)
  1. Part 3 – Through this part a trip simulation is made by defining the origin and the destination. For this the network generated in previous part 2 for the location of Deggendorf is used.
 Another important aspect followed here is the selection of the edges, which the trips are going to be followed. The selected edges are given Id which then used in the Origin Destination Matrix, which consist of the number of vehicles which is travelled from one node to the destination. Using these two data of edges and OD Matrix the trips are generated.
  
 ![image](https://github.com/dinesht27/Sumo_Demo/assets/56340161/c99b4170-6bea-42ce-b6b1-2f2970874487)

 
 
 With the previously generated network file for Deggendorf and the OD trips file, could be used for determining the Optimal Path Routing can be achieved using the duarouter command [3].
 
 The following simulation as could be seen as a gif, in the GIF folder with the name OD.gif.
 
 
 File Name for the selected edges (TAZ file)- TAZ_file.taz.xml File Name for the OD matrix - OD_file.od
 File Name for the Generated Trip file using the TAZ and OD Matrix - od2trips.config.xml File Name for the trip generated using the Optimal Path Routing (duarouter) - od_route_file.odtrips.rou.xml
 Conclusion - This short demo work is intended to show my interest towards the work opportunity in the direction of the traffic simulation along with my understanding skills towards simulation and programming.

Reference – [1] Dr. Rodrigue Tchamna. (2018, April 1). Sumo tutorial [Presentation post]. Retrieved from https://www.slideshare.net/resurrectiondeslanguesminoritaires/sumo-tutorial-1-manual-network-creation-2-osm-to- netwrok-3-od-matrix-to-trip-generation [2] McConky, Katie, and Vaibhav Rungta. Impact of Optimization Strategy and Adoption Rate on V2X Technology on Environmental Impact. No. 49198-16-28. University Transportation Research Center, 2018. [3] German Aerospace Center (DLR) SUMO. (Viewed 2021, March 1). Shortest or Optimal Path Routing [Documentation SUMO]. Retrieved from https://sumo.dlr.de/docs/Demand/Shortest_or_Optimal_Path_Routing.html#:~:text=duarouter%20can%20be%20used%2 0to,sumo%20must%20be%20called%20iteratively [4] German Aerospace Center (DLR) SUMO. (Viewed 2021, March 1). randomTrips.py [Documentation SUMO]. Retrieved from https://sumo.dlr.de/docs/Demand/Shortest_or_Optimal_Path_Routing.html#:~:text=duarouter%20can%20be%20used%2 0to,sumo%20must%20be%20called%20iteratively

About

A demo project for a simple traffic simulation, covering the topics of the Manual network creation, OSM maps to network generation, and defining of the origin to destination matrices.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages