Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows...
Transcript of Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows...
![Page 1: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/1.jpg)
Using SUMO(Simulation of Urban MObility)
![Page 2: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/2.jpg)
Slides
![Page 3: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/3.jpg)
What is it?- SUMO is a open source package which allows you to simulate traffic
- It gives you a lot of control so that you may fine tune the behavior of the roads
and vehicles
![Page 4: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/4.jpg)
Terms
node
node
edge
![Page 5: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/5.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 6: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/6.jpg)
Nodes- id - unique identifier
- x, y - distance from the origin in meters
- These definitions go in a file with a .nod.xml extension
- Example:
<nodes> <node id="1" x="-250.0" y="0.0" /> <node id="2" x="+25050.0" y="0.0" /> </nodes>
![Page 7: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/7.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 8: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/8.jpg)
Edges- id - unique identifier
- from - node car comes from
- to - node car goes to
- These definitions go in a file with a .edg.xml extension
- Example:
<edges> <edge from="1" id="1to2" to="2" /> <edge from="2" id="out" to="3" /> </edges>
![Page 9: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/9.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 10: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/10.jpg)
Network- A definition of nodes and edges that can be recognized by other programs
(SUMO)
- Netconvert
- A tool included in the SUMO installation which takes in node and edge xml files and generates a
network definition.
- Example usage from the command line:
netconvert --node-files=hello.nod.xml --edge-files=hello.edg.xml --output-file=hello.net.xml
![Page 11: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/11.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 12: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/12.jpg)
Defining Vehicles- accel - acceleration of the car (m/s^2)
- decel - deceleration of the car (m/s^2)
- id - unique identifier
- length - car length in meters
- maxspeed - car’s maximum speed (m/s^2)
- sigma - driver imperfection (between 0 and 1)
- Example:
<vType accel="1.0" decel="5.0" id="Car" length="2.0" maxSpeed="100.0" sigma="0.0" />
![Page 13: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/13.jpg)
Instantiating a Vehicle- id - unique identifier
- depart - time in milliseconds before car is spawned
- type - id of a defined vehicle
- route - path taken
- Example:
<vehicle depart="1" id="veh0" route="route0" type="Car" />
![Page 14: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/14.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 15: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/15.jpg)
Routes- id - unique identifier
- edges - a list of edges, separated by spaces, which define the route the vehicle will
take
- Example:
<route id="route0" edges="edge1 edge2"/>
![Page 16: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/16.jpg)
Building a simulation1. Nodes
2. Edges
3. Network (product of nodes and edges)
4. Vehicles
5. Routes
![Page 17: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/17.jpg)
![Page 18: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/18.jpg)
Runnning the simulation- sumo-gui
- A tool included in SUMO to create a visualization for your simulation
- All you need to do is provide it with a config file which gives the paths to your routes, network, etc..
and it does the rest
![Page 19: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/19.jpg)
DEMO 1
![Page 20: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/20.jpg)
Road Types- You can define different types of edges each with their own attributes in a file
with a .typ.xml extension
- priority - the priority of that road based on traffic regulations. Defined by an
integer
- numLanes - number of lanes
- speed - max speed on that edge
- Example:
<type id="a" priority="3" numLanes="3" speed="13.889"/>
![Page 21: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/21.jpg)
DEMO 2
![Page 22: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/22.jpg)
Using OpenStreetMap to create networks- It’s as simple as choosing an area on a map; No XML to define
- Allows you to model real-world locations with ease
![Page 23: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/23.jpg)
Getting the data- Goto https://www.openstreetmap.org/ to select the area of the world you would
like to model
![Page 24: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/24.jpg)
Convert osm data to a network- We will use netconvert from the commandline with an additional flag
netconvert --osm-files file.osm.xml -o file.net.xml
![Page 25: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/25.jpg)
Getting polygons from the osm data- The data from OpenStreetMap also provides figures in that area which allow for a
more realistic simulation
polyconvert --net-file file.net.xml --osm-files file.osm -o file.poly.xml
![Page 26: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/26.jpg)
DEMO 3
![Page 28: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/28.jpg)
Using TraCI- TraCI is a traffic control interface
- It allows you to alter your simulation in real time using a python script which
receives information from the simulation
![Page 29: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/29.jpg)
DEMO 4
![Page 30: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/30.jpg)
Output Analysis
![Page 31: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/31.jpg)
Vehicle Positions- You can receive the location of every vehicle at a user-specified interval of the
simulation
- This can be useful for detecting traffic jams or any other slowdowns
![Page 32: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/32.jpg)
Emission- You can receive data on the amount of car emissions per vehicle
- This would be very useful in making predictions for future amounts of car
emissions
- Can help individuals or companies quantify the impact of their travel on the
environment
![Page 33: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/33.jpg)
Trip Info- Data on the departure and arrival time of each vehicle, number of stops, etc…
- Useful for taxi companies in calculating the efficiency of routes taken
![Page 34: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/34.jpg)
More Infohttp://sumo.dlr.de/wiki/Simulation_of_Urban_MObility_-_Wiki
![Page 35: Using SUMO - Computer Sciencedz220/CS671/7SUMO.pdf · - SUMO is a open source package which allows you to simulate traffic ... - The data from OpenStreetMap also provides figures](https://reader034.fdocuments.net/reader034/viewer/2022051722/5aa1c8847f8b9a80378c1b1a/html5/thumbnails/35.jpg)
Code for Demoshttps://github.com/bigolu/sumo-presentation