SUMO_an_introduction_from_a_beginner
SUMO_an_introduction_from_a_beginner
(SUMO)
An Introduction And Activity Based Transport
Modeling Using SUMO
Dr. Eng. Yonas Minalu
[email protected]
About SUMO
• Simulation of Urban Mobility
– An open-source traffic simulator
– Supports traffic flow and individual vehicles
• Website :
• https://sumo.dlr.de/docs/index.html
SUMO can do the following
• Simulate traffic flow and vehicle movement
– Support different kinds of vehicles and lanes
– Support signal control and priority
– Graphic interface
– Multi-level output (network, lane, vehicle, detector)
– Signal timing coordination
– Actuated and fixed signal timing design/performance evaluation
– Pedestrian simulation…etc…
• Import road network
– Manually design
– Import from OpenStreetMap
• Routing
4
5
6
7
8
9
How to create the intersection, roads or
network ?
1. Using coordinate
2. Manual drawing on netedit.exe
3. From open street-map
10
Example 1: Hello SUMO
1. Road network definition and generation
2. Vehicle/flow definition
3. SUMO configuration
http://sumo.dlr.de/wiki/Tutorials/Hello_Sumo
An example: Hello SUMO
1. Road network
– Node (Junctions and intersections)<.nod.xml>
– Edge (road segment) <.edge.xml>
– Compile<.net.xml>
<nodes> <edges>
<node id="1" x="-250.0" y="0.0" /> <edge from="1" id="1to2" to="2" />
<node id="2" x="+250.0" y="0.0" /> <edge from="2" id="out" to="3" />
<node id="3" x="+251.0" y="0.0" /> </edges>
</nodes>
<routes>
<vType accel="1.0" decel="5.0" id="Car" length="2.0" maxSpeed="100.0" sigma="0.0" />
<route id="route0" edges="1to2 out"/>
<vehicle depart="1" id="veh0" route="route0" type="Car" />
</routes>
http://sumo.dlr.de/wiki/Tutorials/Hello_Sumo
An example: Hello SUMO
3. SUMO configuration
hello.sumocfg
sumo-gui -c hello.sumocfg <configuration>
<input>
<net-
file
value="h
ello.net
.xml"/>
<route-
files
value="h
ello.rou
.xml"/>
http://sumo.dlr.de/wiki/Tutorials/Hello_Sumo </input>
<time>
From Open street map….
15
Zoning, OD, route…….
16
• OD trip generation
od2trips -c odtrips.config.xml -n taz.xml -d od.od -o
odfile.odtrips.xml
• Route
duarouter -c b.duarcfg
• OUTPUT file visualization
sumo-gui -n network file --weight-files FILE --weight-
attribute ATTR -e 86400
17
18
Traffic signals
19
20
21
22
Traffic signals
23
Advanced SUMO
1. Personalize the visualization of vehicles
http://sumo.dlr.de/wiki/Definition_of_Vehicles,_Vehicle_Type
s,_and_Routes#Visualization
2. Import real-world road network
– http://sumo.dlr.de/wiki/Tutorials/OSMWebWizard
– http://sumo.dlr.de/wiki/Tutorials/Import_from_OpenStreetMap
3. Sumo (Simulation of Urban Mobility) Tutorial Part 3: OD Matrix to trip and route
Generation https://www.youtube.com/watch?v=R6v7wDkvXrk&t=108s
26
Mobility Models
1. Trip-Based Mobility Models
It predicts aggregated traffic flows.
It consists of four steps, namely;
Trip generation,
Trip distribution,
Mode choice, and
Route assignment
The modeled area is discretized into traffic analysis zones (TAZs), and
the time of day is discretized into time bins.
2. Activity-Based Mobility Models
It based on simulating human behavior to explain and forecast traffic
reactions to transportation policy or system changes.
This model aim to realistically represent the interdependencies of
activities, times, locations, modes, and routes on a microscopic level.
27
Methodolgy
1. Study Area
2. Data Collection
28
Traditional Four Step Modeling
29
Four Step Demand Modeling
1. Trip Production
Average zonal income (Birr/person/month).
30
Four Step Demand Modeling
32
Four Step Demand Modeling
2. Trip distribution
33
Four Step Demand Modeling
34
Four Step Demand Modeling
35
Four Step Demand Modeling
36
Four Step Demand Modeling
Total trip
adjusted
destination/
attraction is
40380.95 which
is equal to
total trip
production
37
Activity Based Demand Modeling
3
8
Activity Based Demand
Modeling
3
9
Activities in SUMO
Activities
During the day
(retired/unemployed)
4
1
Activity Based Demand
Modeling
4
2
The Study Road Network
4
3
The Study Road Network (Map)
Extracted from Open Street Map (OSM) From Google Map and
Edited
4
4
The Study Road Network
(.Xml)
To make activitygen analysis the road network must be changed in to
an .xml file form. Here it was converted using OSM web wizard
The xml network file comprises
The edge id
Priority
Number of Lanes
What is allowed to passed on that section and width with code
4
5
The Study Road Network
(.Xml)
Examples of edges in xml file form
<edge id="-101827928#0" from="972074823"
to="cluster_1175583525_4880429659" priority="3"
type="highway.residential" shape="2671.96,1350.29 2611.62,1352.36">
4
6
The Statistics or Demographic data
4
7
The Statistics or Demographic
data
One of the most important input data sets for transport modeling is the
population information.
Agent-based transport demand models need high-resolution population
information on the level of single addresses.
4
8
The Statistics or Demographic
General Information data
4500
Region age
3500
ranges
2500
from
1500
Report
500
by the 0-4 5_10 11_14 15-19 20-24 25-30 31-35 36-40 41-45 45-50 51-55 56-60 61-65 66-80 >80
Series1 5160 3882 4239 4452 4379 6028 3595 3170 1727 1624 1123 739 751 825 675
Central
Age Groups
Statistics 5
0
The Statistics or Demographic
Parameters data
Valu
Attribute Name Description
e
Probability that an adult prefers to take his car instead of a
carPreference 0.8 public transportation mean when both are available (80%
from interview)
meanTimePerKmIn 120s Estimation of the time needed to drive one kilometer (bird's
eye) on the map (City Speed limit 30km/hr or 2 minutes)
City ec
freeTimeActivityRa Probability that a given household, a given day, has a free
0.08 time activity using a car (8% from interview)
te
uniformRandomTra Proportion of the random traffic demand in the whole traffic
0.15 demand (Randomly selected 15%)
ffic
Variance of the normal distribution introduced for slight
departureVariation 600 variations in departure time (human natural variation5 in
1
The Statistics or Demographic
Work Hours data
Opening and closing hour proportions are gathered from interview
To change it in to seconds 12:00*3600 seconds = 43,200 seconds
5
2
The Statistics or Demographic
data
Population and Work Position Distribution
Popula
Share of Share of Work / Populat
tion/ Edge Work/
Zon Sub Populati Wor Populatio Work per Edge ion/
Street Edge Length meter
e Zone on (A) k (B) n/ Street Street (F=B* meter
Code (E=A*C (m) (G) (F /G)
(%) (C ) (%) (D) D) (E /G)
)
M1-2 0.3 0.35 3 49 135 0.02 0.36
M1 11 140
M1-8 0.5 0.55 6 77 131 0.05 0.59
M1-2 0.3 0.12 7 52 135 0.05 0.39
1
M2-7 0.15 0.35 4 152 61 0.07 2.49
M2 24 433
M2-6 0.2 0.35 5 152 107 0.05 1.42
M1-8 0.3 0.1 7 43 131 0.05 0.33
5
3
The Statistics or Demographic
data
Adult Proportion (18-35)
Take from
Amhara Adult Ratio (CSA to ANRS) A 37.54%
Region
Total population in the study area B 42, 370
age
Adult population C=A*B 15,908
ranges
Number of households 0.75*C 11,930
from
Total Employed (CSA to ANRS) E 50.29%
Report by
Unemployed adults (1-E)*C 7,908
the
Central
Statistics
Agency of 5
4
The Statistics and Network xml
Files
Sample Network xml files Sample Statistic xml
files
All the above data are fed in to Activitygen by changing the statistics and
network file in to .xml file format
5
5
Activitygen Trips Generation
5
6
Generate Trips in Activitygen
Activitygen
To make activity-based trip generation report we need two basic inputs parameters these
are
The Network file (ABM.net.xml)
The Statistics file (ABM.stat.xml)
the following standard activitygen command was used to generate trips using stat and net
files
At The Command Prompt (CMD)
5
8
Generate Trips in Activitygen
All Trips Sorted by Departure Time
16000
Number of Trips per Hour
14000
12000
Number of Trips
10000
8000
6000
4000
2000
Time in Hour Ti
m
0 e
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 (h
r)
5
9
Hourly Trip Variation
The traffic patterns are consistent over the 24 hours of simulation
The number of trips reaches its peak early in the morning and in the afternoon.
16,041 15,498
16000
Trips Trips
14000
12000
No. of trips
10000
8000
6000
4000
2000
0
0 2 4 6 8 10 12 14 16 18 20 22 24
Time of Day (h)
6
0
Generate Trips in Activitygen
6
1
Comparing
Four Step Model
and
Activity Based Models
6
2
Four Step vs Activitygen
All Trips Sorted by Departure Time
Four Stage vs Activity Based Modeling
Four Activity
Stage Based
Mode Model 75000
Fixed Trips vary 65000
Trips with time 55000
45000
The 35000
25000
Traditiona
15000
l Method
5000
Ignores
About Four Stage Activty Based Difference
48.1% Modeling Modeling
of
The Trips
Series1 40381 77795 37414
6
3
Mode Choice Assignment
Vehicle is a mode of transport used for the traffic flow in the network for the
simulation and it is defined by
The route the vehicle shall drive along
Vehicle color
Time step at which the vehicle shall enter or leave the network
Lane on which the vehicle shall be inserted or leave the network
Position at which the vehicle shall enter or leave the network
Speed of vehicle
Using the standard route choice (duarouter) command at the Command Prompt
(CMD)
The out put (ABMROUTE.rou.xml) shows the route choice of each vehicles with
<duarouter --net-file=ABM.net.xml --route-
time files=ABMTRIP.trips.rou.xml --output-file=ABMROUTE.rou.xml --
ignore-errors>
6
5
Route Choice Assignment
117323137#0"/>
6
6
Macroscopic Simulation
Simulation is a model that mimics the operation of an existing or proposed system
To run the Simulation on SUMO the following inputs and command was used
The Network File (ABM.net.xml)
The Route Choice File (ABMTRIPS.rou.xml)
Using the standard Simulation SUMO command at the Command Prompt (CMD)
The out put (SUMO) shows the Performance of the network with number of
vehicles loaded and simulation
<sumo --net-file=ABM.net.xml--route-files=ABMTRIPS.rou.xml>
6
7
Macroscopic Simulation
Simulatio
n on
SUMO
6
8
Policy Changes
6
9
Policy Changes
7
1
Intersection Signalizing
Traffic signals were installed at three different intersections to assess
the change in trip generation.
7
2
Effects of Policy Changes
7
3
Effect of Intersection
Signalization
The introduction of signalized intersections on the existing road
network has created different changes in the traffic flow
characteristics.
Average trip duration: signalized intersection on the study area
has changed (increased) the trip duration by 15sec.
7
4
Effect of Intersection
Signalization
Average Trip Speed: the installation of signalized intersection has
reduced the average trip speed of vehicles by 2.5m/s.
7
5
Effect of Intersection
Signalization
Average Waiting Time: the waiting times of vehicles stuck at
traffic buildups.
The installation of signals has highly increased the average waiting
time of vehicles in the road network.
7
6
Effect of Intersection
Signalization
Running Vehicles: are vehicles that are either not fully stopped or
in motion but the engine is turn on.
Number of running vehicles after the signalization were greater
7
7
Effect of Intersection
Average Trip Time Loss:Signalization
the average travel/trip time lost by
vehicles when compared to the ideal travel time.
Signalization of the intersection on the study network increases the
average lost trip time
7
8
Effect of Access Management
The blocking of access to some roads around zone 1 has brought
some changes in the overall flow characteristic of the network.
Different flow characteristics like speed, duration, waiting time and
time loss are changed when the policy change is applied.
7
9
Number of Trips
(Before vs Access Management): the graph shows more realistic
positive and negative trip variations before policy change and access
management. Trip Difference (Before - Access Management)
350
315
300
250
200
159
150
100
65
33 43 29 21 34 42
50 20 10 4 13 8
0
0 1 2 3 4 5 6 -5
7 8 9 10 11 12 13 14-10
15 16 17-13
18 19 20-11
21 22 23
-50 -23 -21
-47 -46
-100
-96
-150
-127
8
0
Number of Trips
(Before vs Traffic Light): the graph shows more realistic positive
and negative trip variations before policy change and after
installation of traffic light.
Trip Difference (Before - Traffic Light)
150
136 140
100 90
77
50 40 41 45
33 29 31
19 22 20
5 11 1
11
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
-20 -15
-28 -31 -30
-50 -38 -40
8
1
Number of Trips
e t t
g en h
g
an em Li
h c
C ag affi
i cy an T r
ol M
P ss
re e
o cc
ef A
B
8
2
Conclusion
SUMO is a very powerful tool for simulation and visualization of the real world traffic
flow characteristics.
It has an amazing ability to change Maps from Open Street Map to realistic, editable
and usable road networks.
The four stage modelling method exclude about 48.1% of the generated trip when
compared to the activity based method.
SUMO has made it possible to evaluate the effect of making policy changes on an
existing road networks in terms of:
Average Trip Duration
Average Trip speed
Average waiting time
Average speed
Running vehicle
Average trip time loss
Number of trips 8
3
Thank You !
8
4