Simulation of traffic infrastructure [620625]

Charles University in Prague
Faculty of Mathematics and Physics

BACHELOR THESIS

HakChol Pak

Simulation of traffic infrastructure

Department of Software Engineering

Supervisor: RNDr. Jan Kofro ň, Ph.D.
Study Program: Computer Science, Programming

2010

2
I would like to thank my supervisor, RNDr. Jan Kofron, Ph.D, for the
patient guidance and advice.

I declare that I wrote the thesis inde pendently and that I cited all used
sources of information. I agree with lending the thesis.
Prague, 6 August 2010 HakChol Pak

3
Contents

1. Introduction …………………………………………………………………………………………………. 6  
1.1 Project Motivation ………………………………………………………………………………. 6  
1.2 Project Objectives ……………………………………………………………………………….. 6  
1.3 Thesis Structure ………………………………………………………………………………….. 7  
2. Existing programs ………………………………………………………………………………………… 8  
2.1 Micro-simulation of road traffic ……………………………………………………………. 8  
2.2 Traffic simulation ……………………………………………………………………………….. 9  
2.3 Traffic light simulation ………………………………………………………………………. 10  
3. Analysis …………………………………………………………………………………………………….. 1 2 
3.1 The simulator ……………………………………………………………………………………. 12  
3.1.1 Simulation model …………………………………………………………………………… 12  
3.1.2 Traffic flow model …………………………………………………………………………. 12  
3.1.3 Traffic light control model ………………………………………………………………. 13  
3.1.4 Route choice ………………………………………………………………………………….. 13  
3.1.5 GPS support ………………………………………………………………………………….. 13  
3.2 The editor …………………………………………………………………………………………. 14  
3.2.1 Traffic network design mode …………………………………………………………… 14  
3.2.2 Storing a traffic network data …………………………………………………………… 14  
3.2.3 Multi-lane roads support …………………………………………………………………. 14  
3.3 Chosen technologies ………………………………………………………………………….. 15  
4. Implementation ………………………………………………………………………………………….. 16  
4.1 Object model …………………………………………………………………………………….. 16  
4.2 Implementation details ……………………………………………………………………….. 19  
4.2.1 Generating vehicles ………………………………………………………………………… 19  
4.2.2 Route choice ………………………………………………………………………………….. 19  
4.2.3 Movement of vehicles …………………………………………………………………….. 19  
4.2.4 Traffic light control ………………………………………………………………………… 20  
4.2.5 Calculating statis tical result …………………………………………………………….. 20

4
4.2.6 Drawing objects …………………………………………………………………………….. 20  
4.2.7 Import & Export a traffic network data……………………………………………… 21  
5. User’s Guide ……………………………………………………………………………………………… 22  
5.1 The editor …………………………………………………………………………………………. 22  
5.1.1 Main menu ……………………………………………………………………………………. 22  
5.1.2 Designing a traffic network ……………………………………………………………… 23  
5.2 The simulator ……………………………………………………………………………………. 24  
5.2.1 Main menu ……………………………………………………………………………………. 24  
5.2.2 Setting parameters of the simulator…………………………………………………… 25  
5.2.3 Statistical result ……………………………………………………………………………… 26  
5.2.4 Simulation running section ……………………………………………………………… 27  
6. Conclusion ………………………………………………………………………………………………… 28  
Bibliography …………………………………………………………………………………………………… .. 29

5

Název práce: Simulátor dopravní sít ě
Autor: HakChol Pak
Katedra: Katedra softwarového inženýrství
Vedoucí bakalá řské práce: RNDr. Jan Kofro ň, Ph.D.
E-mail vedoucího: jan.kofron@d3s.mff.cuni.cz
Abstrakt: Cílem projektu je simulovat pohyb vozidel v silni ční síti. Projekt
se skládá ze dvou částí, simulátoru a editoru dopravní sít ě. Editor dopravní
sítě umožňuje uživateli vytvá řet a upravovat dopravní sít ě. Se zvolenou sítí
lze simulovat pohyb vozidel a získat výsledek simulace. Simulace má dv ě
důležité části – model pohybu vozidel a ovládání semafor ů.
Klíčová slova: simulace, dopravní si mulace, mikroskopická simulace,
semafor

Title: Simulation of traffic infrastructure
Author: HakChol Pak
Department: Department of Software Engineering
Supervisor: RNDr. Jan Kofro ň, Ph.D.
Supervisor’s e-mail address: jan.kofron@d3s.mff.cuni.cz
Abstract: The aim of the project is to simu late the movement of vehicles in
the traffic. The project consists of th e two parts, the simulator and the editor
of traffic network. Editor of traffic ne twork allows a user to create and edit
the traffic network. The second part of the program will be able to simulate
the movement of vehicles in the tra ffic network and get simulation results.
The simulation model consists of two important parts – the movement of
the vehicles and traffic lights control.

Keywords: simulation, traffic simulati on, micro-simulation, traffic light

6
Chapter 1
Introduction
This report is intended to document the bachel or project, whose name is “Simulation of
traffic infrastructure”. It covers the anal ysis, implementation and user’s guide of the
project.

1.1 Project Motivation
Traffic is an important aspect of the economy and our life. Every count ry invests lots of
money to improve its state. Nevertheless, we are not satisfied with the current traffic
system and we want some further developmen t of it. For example, sometimes we meet
traffic jam in the morning or in the evening, when people are going to or from the office.
One of the possible solutions could be constr uction of new roads, but it is expensive.
The program is intended to solve this prob lem without any reconstruction of the real
traffic situation in some chosen city but to simulate traffic in general infrastructure. The simulation of traffic gives us information how to improve traffic syst em. Using the result
of the simulation the traffic system might be optimized. However, building a complete
simulation model is an uneasy task. Worki ng on this project is a good chance to get
some experience in both project development and also in building the simulation model.

1.2 Project Objectives
The project aims to build the simulation model, show its behavior and present its result
in a graphical user interface. The program will provide an interface to edit the traffic
network. The program will also provide an interface to specify parameters such as
simulation speed and traffic intensity levels before simulation starts or dynamically
change during the simulation. Finally, the prog ram will provide statistical results for
data gained from simulation.

In summary, there will be two parts to the project.
1. An interface to build any traffic network.

7
2. A simulation displaying the model r un on the data supplied and producing
statistical results.
1.3 Thesis Structure
Next chapter evaluates already existing simu lators such as micro-simulation of road
network, traffic simulation and traffic light si mulations. Third chapter is about analysis
of the project. Fourth chapter explains the implementation of the project in detail. Fifth
chapter describes a user guide, which gives whole instruction for operating the program.
The final chapter of the thesis is the conclusion of the project.

E
I
t

2
L
A
o

T
r
T
lChapt
Existi
In this cha p
traffic simu l
2.1 Mi
Location: h t
Author: Dr M
of Technolo
The Micro- s
road with t w
The simula t
lane chang e
ter 2
ing pr o
pter, we ev a
lation progr a
cro-sim
ttp://www.tr a
Martin Trei b
gy
Figure 2
simulation o
wo lanes. It s
ion realize d
e model. Th i
ogram
aluate alrea d
ams.
ulation
affic-simula t
ber, Institut e
.1: Screens h
of road traf f
simulates th e
d several tra f
is simulator
8 ms
dy existing
of road
tion.de/ [1]
e for Transp
hot of Micro –
fic simulate s
e movement
ffic models
is good at
simulators t
traffic
ports and Ec o
-simulation o
s one-direct i
of vehicles
such as the
showing s o
to get infor m
onomics, D r
of road traf f
ional road t r
of two type s
intelligent d
ome basic b e
mation abo u
resden Uni v
fic
raffic on a s
s, cars and t r
driver mod e
ehavior of t
ut the
versity

single
rucks.
el and
traffic

s
e

2
L
A

T
c
l
t
s
r
a
s

simulators. H
editing the t r
2.2 Tra
Location: h t
Author: Kel l
This progr a
controlled b
lights from
traffic flow
simulator is
roads are li m
and does n o
simulates o n
However, th
raffic netwo
affic si m
ttp://www.p h
ly Liu, Dep a
Fi
am simulat e
by either tra f
a short dur a
model. It p r
good at sh o
mited to on e
ot give the u
nly 4-way ju n
e simulator d
rk. It also d o
mulatio n
hy.ntnu.e du.t
artment of P h
igure 2.2: S c
es the traffi
ffic lights o r
ation to a l o
roduces a re a
owing som e
e lane. This
usable statis t
nctions.
9 does not gi v
oes not reali z
n
tw/oldjava/ O
hysics at N a
creenshot o f
c network
r stop signs.
onger durati o
al time grap h
e basic beh a
simulator d o
tical result e
ve any statis t
ze the traffi c
Others/traffi c
ational Taiw a
fTraffic sim u
with three
The user c a
on. This si m
h of the nu m
avior of tra f
oes not allo w
except the n
tical result a n
c light contr o
cSimulation
an Normal U
ulation
junctions. E
an change t h
mulator is b
mber of cars
ffic simulat o
w editing t h
number of c a
nd does not
ol model.
/applet.htm l
University
Each juncti
he phasing o
ased on a s i
per second .
ors. Howev e
he traffic ne t
ars per seco
allow
l [2]

on is
of the
imple
. This
er, the
twork
nd. It

2
L
A

T
s
l
a
t
t
g
a2.3 Tra
Location: h t
Author: Kat h

This simul a
scenario si m
lights have a
are not dep e
turn onto cr o
third scenar i
green if the
ambulance i
affic lig h
ttp://www.c s
herine Deib e
Figu
ator simulat
mulates the t
a random d u
endent on t h
oss streets, s
ios involve
ambulance
s within a c e
ht simu l
s.washingto n
el, Compute
ure 2.3: Scre
es the traf f
traffic net w
uration. The
he number o
so they nev e
the handlin g
s are appro a
ertain radiu s
10 lation
n.edu/homes
r Science &
enshot of T r
fic network
work using t h
duration of
of vehicles o
er turn left o
g of ambula n
aching a li g
s of the car a
/deibel/rt/ [ 3
Engineerin g
raffic light s i
in three d
he basic tr a
an amber li
on their inc o
or right into
nces. In the
ght. The ca r
and if there i
3]
g, Universit y
imulation
different sc e
affic light m
ight is const a
oming street s
other roads
second sce n
rs pull over
s a chance t h
y of Washin g
enarios. Th e
model. The t
ant. Traffic
s. The cars
. The secon
nario, the li g
to the side
he car coul d
gton

e first
traffic
lights
never
d and
ght is
if an
d be in

11
the way of the ambulances. In the final scenari o, the light is switched to the green before
the ambulance arrivals so it does not need to slow down. This simulator is good at
showing some basic behavior of traffic light control model. However, it does not provide
any statistical result and does not allow editing the traffic network. It simulates only 4-way junctions.

12
Chapter 3
Analysis
In this chapter, we analyze project requirements and their possible solutions by describing advantages and disadvantages.

3.1 The simulator
3.1.1 Simulation model
First step in this analysis is a choice of a simulation model. There are two common
approaches for simulation model, the m acro-simulation model and micro-simulation
model. The macro-simulation model evalua tes traffic flow as a whole without
consideration of the characteri stics and features of indivi dual vehicles in the traffic
network [4]. The micro-simulation model simu lates the behavior of individual vehicles
in the traffic network. It considers the feat ures and characteristic s of the individual
vehicles and uses vehicle following model. Th e aim of this project is to simulate the
behavior of individual vehicl es with showing of their m ovement in graphical user
interface. Therefore, our simu lation model must be taken as micro-simulation model.
3.1.2 Traffic flow model
Because the micro-simulation model was chosen in first step, it is necessary to build a
traffic flow model. The traffic flow model si mulate single vehicle-driver units, thus the
dynamic variables of the modes represent prope rties like the position and velocity of a
single vehicle [5]. The most impor tant part of this model is to set the next position of a
single vehicle through time. There are two po ssible models, the linear driver model and
intelligent driver model [6]. The linear driver model sets next position of vehicles by
linear function without consid ering characteristics of acce leration and deceleration of
vehicles and the desired time headway to the ve hicle in front. It has the advantage of the
simple implementation. The disadvantage is that this model does not realize the behavior
of vehicles in reality. In contrast to the lin ear driver model, the intelligent driver model

13
realizes the behavior of vehicl es in reality. It describes the dynamics of the positions and
velocities of vehicles with c onsidering the behavior of vehi cles in reality. There exists
the intelligent driver model definition by Helbing, Hennecke and Treiber. Nevertheless,
this project will not use already existing m odel definition. I will build own intelligent
driver model, because it is the important part of the project.
3.1.3 Traffic light control model
Building a traffic light control model is one of the important parts in the simulation of
traffic infrastructure. However, the optimal c ontrol of traffic lights in the traffic network
is highly complex problem. Therefore, most traffic lights in practi ce are controlled by
fixed-cycle control models. It could be an e ffective solution for fixed-way junctions such
as 3-way junction and 4-way junction. However, our project intended to support even
more-way junctions. For more-way junctions there is no optimal control model yet. The
program implements its own traffic light co ntrol model even for more-way junctions.
3.1.4 Route choice
After entry-point and exit-point of the vehi cles are chosen, the simulation finds their
shortest travel route. There are two typical algorithms to get the shortest path, the
Dijkstra [7] and Bellman-Ford algorithm [8]. The Dijkstra algorithm finds the shortest
path from one node to all nodes in a grap h with non-negative edge weights. The
complexity of this algorithm is quadratic (in the size of the gr aph). The Bellman-Ford
algorithm finds the shortest path between each two nodes with the cubic complexity. It
works even in a graph with negative edge weights. When comparing two algorithms, the
Dijkstra algorithm is faster than the Bellm an-Ford algorithm. In addition, the traffic
network does not have negative edge weights. Therefore, I have chosen the Dijkstra
algorithm.
3.1.5 GPS support
In the beginning of the project, GPS (G lobal Positioning System) support in the
simulation was intended. It means that the si mulation works with actual vehicles using
GPS. However, I realized that GPS suppor t is not necessary. The Global Positioning
System (GPS) is a space-based global naviga tion satellite system that provides reliable

14
location and time information in all weather and at all times and anywhere on or near the
Earth when and where there is an unobstruc ted line of sight to four or more GPS
satellites [9]. In other words, it gives info rmation about the actual location of earth. In
this case, there is no a need of the editor, because the editor does not design a traffic
network in reality. It just could be used a real map data like the OpenStreetMap [10].
However, as the editor of the traffic networ k is the important part of the project, the
project will not support GPS.

3.2 The editor
3.2.1 Traffic network design mode
The design mode of the traffic network shoul d be easy and simple. So designing its parts
should work in an intuitive way. For exam ple, designing roads s hould be like drawing
lines in a drawing package and each new node of a road should be connected with the
previous node.
3.2.2 Storing a traffic network data
The editor of the traffic network should provid e storing its data to lo ad it in a simulation.
It could be used an xml document or database to store the traffic network data. Using the
database is convenient for storing a nd managing big amount of content. The
disadvantage is that on a computer, on which the simulation is running, must be installed
the database server. Using the xml document is useful if storing and managing small
amount of content. It has the disadvantage of complex querying. However, the editor
does not need lots of queryi ng, so using the xml document suffices to store the traffic
network data.
3.2.3 Multi-lane roads support
The traffic network consists of multi-lane ro ads. To display the movement of vehicles,
the simulator should support at least two-lane ro ads, one lane in the direction of the road
and another lane in the opposite direction. However, if it supports more multi-lane roads,

15
the program will be more complex, because it must build a lane-change model yet. The
program will support only two-lane roads to avoid the complexity problems.
3.3 Chosen technologies
The program is platform dependent on th e Windows operation system. For being the
independent platform, the project should be re alized in Java. However, I am not such a
good Java programmer. I have chosen .NET Framework 4.0 technologies to realize the
project. The project has a modern graphical user interface according to the requirements.
In order to satisfy this condition, we can choose .NET Windows or .NET Windows
Presentation Foundation technology [11]. The .NET Windows Pr esentation Foundation
is stronger than .NET Windows for represen ting graphical objects. Therefore, I have
chosen .NET Windows Presentation Foundati on technology to realize the project.

16
Chapter 4
Implementation
This chapter explains the implementation of the project in detail. Firstly, we show the
object model of the project and then we describe the implementation.

4.1 Object model
The object model consists of se veral class packages divided by functionality. It helps to
have less relationship between each cla ss and understand the system quickly.

Class packages designed in this project are following.
 Map – represents the traffic ne twork. It contains the classes Map , Way , Node ,
OutLine , CenterLine and Lane .
 DrawManager – allows to draw all graphica l objects in the proj ect. It contains
the classes DrawManager , ObjectShape and inherited classes from the
ObjectShape class such as the classes CenterlineShape , OutlineShape ,
NodeShape , EdgeShape and VehicleShape . The DrawManager class manages
the object drawing ObjectShape on the drawing panel. The ObjectShape class
represents the shape of the object.
 XMLMananger – handles saving and loading of the traffic network data to and
from the xml file. It contains the classes XMLManager , NodeElement and
WayElement . This package uses the Map package when importing or exporting
the traffic network data.
 TimerManager – manages all aspects of the simulator through the time. It
contains the classes TimerManager , GenerateManager , MoveManager,
TrafficLightManager and Timer . The class GenerateManager generates
vehicles during the simulation. The MoveManager class realizes the movement
of vehicles through time. The TrafficLightManager class serves to control all
traffic lights. This package gets informa tion about vehicles an d traffic lights from
the classes VehicleList and TrafficLightList .

17
 Vehicle – represents the vehicl e. It contains the classes Vehicle , Car and Truck .
The Vehicle class has its simulation mode l and route choice algorithm.
 SimulationModel – realizes the simulation model. It contains the interface
SimulationModel , the class IDM , IDMCar and IDMTruck . The IDM class
represents the intelligent driver model.
 PathAlgorithm – calculates the vehicle’s route. It contains the class Dijkstra ,
ShortestAlgorithm and PathAlgorithm .
 TrafficLight – controls the behavior of the traffic light . It contains the classes
TrafficLight , LongestQueueFirst and LongestWaitFirst . The
LongestQueueFirst class represents the traffic light, which lets pass the vehicles
from the longest queue at first. The LongestWaitFirst class represents the traffic
light, which lets pass the ve hicles from the longest waiting queue at first.
 StatisticsManager – provides the statistical result of the simulator. It contains the
class StatisticsManager .
 GeometryManager – provides all geometric calculations used in the project. It
contains the class GeometryManager .

Figure 4.1 shows the relationships between each of the classes in the project.

Figure 4.1:
18 Class diagr a
am of the pr o
oject

19
4.2 Implementation details
4.2.1 Generating vehicles
The GenerateManager class generates vehicles during the simulation. The
GenerateVehicle method in the class generates one ve hicle at regular intervals. This
interval is determined by two parameters of the simulator: “simulation speed” and
“vehicle flow”. The parameter “simulation sp eed” indicates how fast the simulation runs.
The parameter “vehicle flow” indicates how ma ny vehicles is generated per hour. Before
generating the vehicle, its type(car or truck) ha ve to be chosen. The type of the vehicle is
determined by the parameter “car percentag e”. The program generates the random value
between 0 and 100. If this value is smaller than the value of the parameter “car percentage”, it generates the car. Otherwise, it generates the truc k. When a vehicle is
generated, the generator sets an entry point and exit point of the vehicle. The entry point
and exit point are nodes, which has one degree in the traffic network in order to show
the leaving and arrival of the vehicle clea rly. When the entry point and exit point are
chosen, the generator calculates its shortest route. Finally, the generator adds the vehicle
to the list of vehicles, wh ich is represented by the VehicleList class.
4.2.2 Route choice
The project realizes one algor ithm for a route choice. The Dijkstra class calculates the
shortest route of the vehicle from the entry to the exit. It realizes the Dijkstra’s algorithm
[7]. The GetPath method in the Dijkstra class returns the vehi cle shortest route.
4.2.3 Movement of vehicles
The MoveManager class provides the movement of the vehicles. The MoveVehicles
method in the class moves the vehicles. It moves each vehicle from the VehicleList
class by the intelligent driver model. The IDM class realizes the intelligent driver model.
The CalcAcc method in the class returns the accel eration of the vehicle. When it is
given the acceleration of the vehicle, the Move method in the Vehicle class sets the next
position of the vehicle and moves the represen tation of the vehicle to the next position.

20
4.2.4 Traffic light control
The TrafficLightManager class manages the control of traffic lights. The
InitTrafficLights method in the class initializes each traffic light with the traffic light
control model LongestQueueFirst or Longe stWaitFirst. The LongestQueueFirst model
releases first the longest queue. This model is realized by the LongestQueueFirst class.
The LongestWaitFirst model releases first the longest waiting queue. This model is
realized by the LongestWaitFirst class. The UpdateTrafficLights method in the class
updates the status of each traffic light from the TrafficLightList class.
4.2.5 Calculating statistical result
The results of the simulation are th e statistical results. The static StatisticsManager
class returns the st atistical results of the simulation. The InitStatistics method in the
class initializes the statistical results and the UpdateStatistics method updates the
statistical results. Both methods get information about vehicles from the VehicleList
class.

The class calculates the st atistical result as follows
 How many vehicles have en tered the traffic network.
 How many vehicles have ex ited the traffic network.
 How many kilometers have travelled.
 How long have the vehicles travelled.
 The average speed of all the vehicles.
 The delay time of all vehicles.
4.2.6 Drawing objects
In the project, each object, which is drawn on the drawing panel, has its shape object.
For example, the Vehicle class has its shape class – VehicleShape . The VehicleShape
class represents the shape of the vehicle on th e drawing panel. Such classes are inherited
from the ObjectShape class. Then there is the DrawingManager class to manage the
ObjectShape class. There are three important methods in the class: Draw , Remove and
Clear . The Draw method draws the object shape to the drawing panel. The method

21
Remove removes the object shape fr om the drawing panel. The Clear method clears the
drawing panel.
4.2.7 Import & Export a traffic network data
The project uses the xml file to impor t and export a traffic network data. The
XMLManager class provides loading and saving of the traffic network data. There are
two important methods: LoadMap and SaveMap . The LoadMap method loads the
traffic network data from the xml file. The SaveMap method exports the traffic network
data to the xml file.

Below there is the xml file structure of the traffic network that is written in DTD (Document Type Definition).

<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT map (nodes, ways)>
<!ELEMENT nodes (node*)>
<!ELEMENT node EMPTY>
<!ATTLIST node id ID #REQUIRED> <!ATTLIST node x CDATA #REQUIRED> <!ATTLIST node y CDATA #REQUIRED>
<!ELEMENT ways (way*)>
<!ELEMENT way (nd*)> <!ATTLIST way id ID #REQUIRED>
<!ELEMENT nd EMPTY>
<!ATTLIST nd ref IDREF #REQUIRED>

U
T
t

5
T
l

5

Chapt
User’s
This chapte r
traffic netw o
5.1 Th
The editor i
loaded and m
5.1.1 Mai
ter 5
s Guid
r gives user
ork and run a
e edito r
s the part o f
modified. It c
in menu
de
s a complet
a simulatio n
r
f the progr a
consists of t w
Figure
Figure 5.2:
22 e guide of t
n.
am in which
wo sections ,
5.1: The ed i
The main m
the progra m
a traffic n e
, a main me n
itor interfac e
menu of the e
m. It explain s
etwork can b
nu and dra w
e

editor
s how to cr e
be created, s
wing section.
eate a
saved,

23
The main menu is on the left and top of the edit or. It consists of se veral buttons such as
“New”, “Open”, “Save”, “Save as” and “Edit”.

Functionality of each button:
 New – creates the new traffic network. By clicking the button the content of the
drawing panel (on the right side of the window) is erased and ready to draw the
new traffic network.
 Open – opens existing traffic networ k. The file extension is “.map”.
 Save – saves the traffic network into a file. If traffic network has been made up
before then the changes are saved to co rresponding file. Otherwise, behaves like
the button “Save as”.
 Save as – saves the traffic network into the file with specified name.
 Edit – modifies the traffic network loaded for a simulation.
5.1.2 Designing a traffic network
A traffic network consists of roads. A road consists of nodes. Construction of a traffic
network is initiated by clicking on the design panel situated on the right part of the
window.

How to design a traffic network:
 Single click by a mouse left button
o If it is the first click after finished construction of the previous road, it
creates a new road and it adds a start node into th e created road.
o If it is not the first click in the cu rrent road design, it adds one node into
the current road.
o If it is clicked on some already ex isting node, the previously generated
node and the node that was clicked on are connected with a new road.
 Double click by a mouse left button
o It finishes drawing the current road.

5
T
t
s
m

5

T
b
5.2 Th
The simulat
traffic net w
sections, m a
movement s
5.2.1 Mai
The main m
buttons: “L o
e simul a
or shows a r
work and gi v
ain menu, s e
ection.
in menu
F
menu is at t h
oad map”, “ S
ator
run of the s
ves the stat i
etting param e
Figu
igure 5.4: T h
he top of o n
Start”, “Pau s
24 imulation –
istical resul t
eters of the
ure 5.3: The

he main me n
n the left si d
se”, “Resum e
the movem e
t of the si m
simulation,
simulato r
nu of the si m
de of the w
e” and “Sto p
ent of vehic
mulation. It
statistical r e

mulato r
window. It c o
p”.
les on the l o
consists o f
esults and v e
onsists of s e
oaded
f four
ehicle

everal

F
5

J
P

Functionalit y
 Load
simu
 Start
any t
 Paus
funct
 Resu
funct
 Stop
5.2.2 Sett
Just below
Parameters c
Meaning a n
 Simu
simu
simu
 Car p
their
 Vehi
geney of each bu
d map – lo a
ulated the m o
t – starts th e
traffic netw o
e – pauses
tion change s
ume – resu m
tion change s
– stops the r
ting para m
the main m
could be ch a
nd value int e
ulation spee
ulation. The
ulation. Its r a
percentage –
total numb e
icle flow –
erated per h o
utton:
ads the tra f
ovement of v
e new simul a
ork.
the runnin g
s to “Resum e
mes the pau s
s to “Pause” .
running sim u
meters of t
Figure
menu of t h
anged at any
erval of each
d – This p a
higher is t
ange is in fr o
– This para m
er. It is in th e
This param e
our. Its rang e
25 ffic networ k
vehicles.
ation. This b
g simulatio n
e”.
sed simulati
.
ulation.
the simul a
5.5: Param e
he simulato r
time.
parameter i
arameter in d
the value o f
om 0.1 to 10
meter indicat
e range 0 to
eter indicat e
e is in from 0
k from a fi l
button is di s
n. By click
ion. By clic k
ator
eters Setting
r is a sect i
is as follows
dicates the v
f this para m
.0. The defa u
tes the perc e
1000. The d
es the valu e
0.1 to 10.0. T
le. On this
sabled, if t h
king this b u
king this b u

g
ion for pa r
.
value of ho w
meter the hi
ault value is 1
entage of ge n
default valu e
e of how m
The default v
network w i
here is not l o
utton its tex
utton its te x
rameters se t
w f a s t t o r u
gher is spe
1.5.
nerated cars
e is 70.
many vehicl e
value is 200 0ill be
oaded
t and
xt and
ttings.
un the
ed of
from
es are
0.

5

T
c
v
d

M5.2.3 Stat
The statisti c
contains sta t
vehicles. T h
different sta t
Meaning of
 The
vehic
 The
vehic
 Vehi
vehic
netw
 Vehi
that h
 Mean
/ “Vetistical re s
Figu
cal results s e
tistics of th e
here are tw o
tistics.
each param e
number o f
cles that ha v
number of
cles in the t r
icle miles t
cles that ha v
work).
icle hours t r
have passed
n vehicle sp
ehicle hours
sult
ure 5.6: The
ection is at
e simulatio n
o types of
eter is as fol l
vehicles t r
ve already fi n
vehicles tr
raffic netwo r
travele d – T
ve passed an
raveled – T h
and that ar e
eed – The v a
travele d”.
26 statistical r e
the bottom
n according
vehicles, c a
lows.
ravele d – T h
nished drivi n
aveling – T
rk.
This param e
d that are m
his paramete
e moving ju s
alue of this p
esult of the s i
on the left
to type of t
ar and truc k
his parame t
ng (went in a
This parame t
eter indicat
moving just n
er indicates t
st now (all v e
parameter e q

imulation
side of th e
the vehicle s
k. Therefor e
ter indicate s
and out).
ter indicate
tes the tra v
now (all veh i
the traveled
ehicles in th
quals “Vehi c
e window. I t
s and all ty p
e, there are
s the num b
s the num b
veled distan c
icles in the t
time of ve h
e traffic net w
cle miles tr at also
pes of
three
ber of
ber of
ce of
traffic
hicles
work).
aveled”

27
 Total vehicle delay – This parameter indicates the delayed time of vehicles that
have passed and that are m oving just now (all vehicles in the traffic network).

Parameters mentioned above are only for all types of vehicles together. There are two
identical sets of paramete rs for cars and trucks too.
5.2.4 Simulation running section
The simulation run section is on the right si de of the simulator window. This section
shows the movement of vehicles on the traffic network in time.

28
Chapter 6
Conclusion
The aim of the project was to simulate the movement of vehicles in the traffic network. In order to solve the project specification, there were the simulator and editor of the
traffic network realized. In detail, we produced the editor that enables to design a traffic
network easily and simply in graphical user interface. We also made up the simulator
that simulates the movement of vehicles in the traffic network. In the simulator, we built
its own intelligent driver model and traffic light control model. The only deviation from
the project specification is that the si mulator does not support GPS. We already
mentioned this deviation in chapter 3.

Although almost all project specifications were implemented, there still exist further development possibilities. In th e project, the traffic network c onsists of two-lane roads.
To get more correct simulation results it shoul d consist of multi-lane roads. The traffic
light control model might be more optimal. Fo r the vehicle routes the program used the
routing algorithm to get the shortest path. Th e routing algorithm to get the quickest path
might be added.

I have learned how to build the traffic simu lation model and realize it when working on
this project.

29
Bibliography

[1] Martin Treiber, Institute for Transpor ts and Economics, Dresden University of
Technology
Micro-simulation of road traffic
http://www.traffic-simulation.de

[2] Kelly Liu, Department of Physics at National Taiwan Normal University
Traffic Simulation
http://www.phy.ntnu.edu.tw/oldjava/Othe rs/trafficSimulation/applet.html
[3] Katherine Deibel, Computer Science & Engineering, Univer sity of Washington
Traffic Light Simulations
http://www.cs.washington.edu/homes/deibel/rt
[4] Mark Yand, Principal, DKS Associates
Macro versus Micro Simulation Modeling Tools
http://www.dksassociates.com/adm in/paperfile/9A_Yand_Paper.pdf
[5] Wikpedia
Microscopic traf fic flow model
http://en.wikipedia.org/wiki/Mic roscopic_traffic_flow_model
[6] Wikipedia
Intelligent Driver Model
http://en.wikipedia.org/wik i/Intelligent_Driver_Model
[7] Wikipedia
Dijkstra’s algorithm
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
[8] Wikipedia
Bellman-Ford algorithm
http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm
[9] Wikipedia
Global Positioning System
http://en.wikipedia.org/wiki/Gps
[10] OpenStreetMap
OpenStreetMap
http://www.openstreetmap.org/

30
[11] MSDN
Windows Presentation Foundation
http://msdn.microsoft.com/en-us/library/ms754130.aspx

Similar Posts