Basic Traffic Microsimulation in SUMO
Basic Traffic Microsimulation in SUMO
Microsimulation
Fundamentals of Transportation Engineering
CETRAN30
MSDS
Traffic Microsimulation
▪ Simulates the behavior of individual vehicles within a predefined road
network, and
MSDS
Microsimulation Areas
▪ Evaluate the performance of traffic lights
▪ Vehicle route
▪ Traffic effects of autonomous vehicles and platoons
▪ Parking traffic
▪ Railway traffic (for AI-dispatching)
▪ Traffic safety and risk analysis
▪ Calculation of emissions (noise and pollutants)
MSDS
▪ Free and open-source traffic simulation suite
▪ Allows modelling of intermodal traffic systems - including road
vehicles, public transport and pedestrians
▪ SUMO can be enhanced with custom models and provides various
Application Programming Interface (APIs) to remotely control the
simulation
MSDS
Essential tools for the course:
1. SUMO package
(https://sumo.dlr.de/docs/Downloads.php)
MSDS
Basic Elements of Models
1. Nodes and Edges
(https://sumo.dlr.de/docs/Networks/PlainXML.html)
MSDS
Creating Simple Network
Fundamentals of Transportation Engineering
CETRAN30
MSDS
Creating and Formatting Nodes
Node syntax:
Reference: https://sumo.dlr.de/docs/Networks/PlainXML.html
MSDS
MSDS
1(-500,0)
MSDS
4(500,0)
5(500,0)
MSDS
Node types
MSDS
Creating and Formatting Edges
Edge syntax:
Reference: https://sumo.dlr.de/docs/Networks/PlainXML.html
MSDS
MSDS
Origin-Destination to Trip
Simulation
Fundamentals of Transportation Engineering
CETRAN30
MSDS
Pre-requisite files:
1. Node file (.nod.xml)
2. Edge file (.edg.xml)
3. Network file (.net.xml)
Optional:
1. Connection file (.con.xml)
2. Type file (.typ.xml)
MSDS
Procedures
0. Network file (.net.xml)
MSDS
Example
2 km 2 km 2 km 2 km
3 6 9 12 15
B C
1 km D
2 5 8 11 14
1.5 km E
A
1 4 7 10 13
O\D A B C D E
A - 100 200 150 175
B 50 - 75 125 100
OD Trips during
C 250 50 - 80 100
peak hour
D 100 200 175 - 150
E 125 75 200 300 - MSDS
1.) Traffic Assignment Zone (TAZ)
Definition
<additional>
<tazs>
<taz id=“t1” edges=“put_your_edge_id_here”>
</taz>
<taz id=“t2” edges=“put_your_edge_id_here”>
</taz>
<taz id=“t3” edges=“put_your_edge_id_here”>
</taz>
<taz id=“t4” edges=“put_your_edge_id_here”>
</taz>
…
</tazs>
</additional>
MSDS
2.) Origin-Destination (OD) Matrix
$O;D2
* From-Time To-Time
0.00 1.00
* Factor
1.00
*
* some
* additional
* comments
t1 t2 200
t1 t12 500
…
t12 t1 1000
MSDS
3.) Origin-Destination to Trips
Configuration
<configuration>
<input>
<taz-files value=“TAZ_file.taz.xml"/>
<od-matrix-files value=“OD_file.od"/>
</input>
<!--
<output>
<output-file value=“od_file.odtrips.xml"/>
</output>
-->
</configuration>
MSDS
Trip Generation from OD Matrix
(feed to Command line, cmd)
od2trips –c PATH\od2trips.config.xml –n PATH\taz_file.taz.xml –d
PATH\OD_file.od –o PATH\od_file.odtrips.xml
+ +
TAZ_file.taz.xml OD_file.od od2trips.config.xml
=
MSDS
Od_file.odtrips.xml
4. Create DUAROUTER
Configuration
<configuration>
<!-- The duarouter configuration file takes as input in your network and the OD
Trips File and output the route file -->
<input>
<net-file value="road.net.xml"/>
<route-files value="road.odtrips.xml"/>
</input>
<output>
<output-file value="road.odtrips.rou.xml"/>
</output>
<report>
<xml-validation value="never"/>
<no-step-log value="true"/>
</report>
</configuration>
MSDS
Route Assignment using DUAROUTER
(feed to Command line, cmd)
duarouter –c PATH\duarcfg_file.trip2routes.duarcfg –o
od_route_file.odtrips.rou.xml
+ =
Network_file.net.xml od_file.odtrips.xml od_route_file.odtrips.rou.xml
MSDS
5. Rewrite SUMO Configuration file
<configuration>
<input>
<net-file value=“network_file.net.xml"/>
<route-files value=“od_route_file.odtrips.rou.xml"/>
</input>
<time>
<begin value="0"/>
<end value=“_user-specific_input"/>
</time>
</configuration>
File_name: config_file.sumocfg
MSDS