Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Master Thesis
Introducing Driving Behavior Modelinto Large-scale Multi-agent Traffic
Simulation
Supervisor Professor Toru Ishida
Department of Social Informatics
Graduate School of Informatics
Kyoto University
Yoshiyuki NAKAI
February 2, 2010
i
大規模マルチエージェント交通シミュレーションへの運転行動モデルの導入
中井 喜之
内容梗概
エージェントベースシミュレーションが社会システムと社会現象を理解する
ために有用な技術であると認識されている.社会シミュレーションにリアリティ
を持たせるためには,仮想社会を構成するエージェントに実際の人間の行動を
割り当てることが有効である.また,社会現象を再現するためには実際の社会
と同じ規模でシミュレーションを行うことが望ましい.このように,大規模マ
ルチエージェントシミュレーションは世の中から求められていて期待できる技
術である.
日本の道路交通は運転者の高齢化や新交通システムの普及により大きく変わ
ろうとしている.将来の道路交通に起こりうる問題を予想したり,その問題を解
決する交通政策を検討したりするために,新しい技術が必要とされている.交
通シミュレーションは現実世界での社会実験と異なり,条件を変えて何度でも
交通政策の効果を検証できるという点で有用である.
交通シミュレーションには,2つの主要なアプローチがある.1つ目のアプ
ローチは,ミクロなモデルによる車両一台ごとの挙動の再現を目指すものであ
る.各車両が,走行速度の決定,車線変更,交差点での右左折,路上駐車,障
害物の回避などを再現できるようなモデルを持っている.2つ目のアプローチ
は,大規模な道路ネットワーク上で渋滞や各車両の静的/動的経路選択を再現
することを目指すものである.各道路リンクが,交通量–密度特性から車両移動
の計算をするようなマクロなモデルを持っている.
交通は,多数の運転者の個々の運転行動の蓄積で発生する社会現象である.ゆ
えに都市規模の交通政策を検討するためには,都市全体の交通流を見るマクロ
的な視点と同時に,政策の影響を直接受ける各運転者の行動に注目するミクロ
的な視点が必要である.そこで本研究では,下記の 2つの課題に取り組む.
1. 運転行動モデルに基づく大規模交通シミュレーションプラットフォームの
構築
1つ目の課題は,ユーザーが都市全体の交通流を見るマクロ的な視点と同時
に,各運転者の行動に注目するミクロ的な視点を持つことを可能にするシ
ii
ミュレーションプラットフォームを構築することである.プラットフォーム
は大規模交通をミクロレベルで再現できなければならない.プラットフォー
ムの各運転者エージェントはそれぞれの運転行動モデルを持ち,環境を認
識して車両を運転することができる.
2. 例題となるシミュレーションによるプラットフォームの検証
2つ目の課題は例題となるシミュレーションによってプラットフォームの可
能性を示すことである.例題の設定は道路ネットワークとエージェントの
設定からなる.道路ネットワークは道路と交差点の集合である.エージェ
ントの設定はOD(起終点)と運転行動モデルである.
本研究の貢献は下記のとおりである.
1. ミクロモデルとマクロモデルを統合するエージェントと道路リンクの設計
1つ目の貢献はプラットフォームのためのエージェントと道路リンクの設
計をすることである.エージェントは経路選択のレイヤと運転行動のレイ
ヤの 2つからなる.経路選択レイヤは抽象的な道路ネットワークにおける
経路を決定し,運転行動レイヤは運転行動モデルに基づいて道路リンク上
の車両を運転する.各道路リンクは 2次元平面上の道路を持っていて,そ
の上を車両が通過する.プラットフォームはMATSim-Tという名前のツー
ルキットを用いて実装された.MATSim-Tは大規模エージェントベース交
通シミュレーションを効率的に実行できる.
2. 運転行動モデル導入の検証とシミュレーション実行時間の検証
プラットフォームは検証のため,2つの例題に適用された.1つ目の例題は
単純であり結果を予測することが可能で,プラットフォームが正しく動作
していることを確認できた.2つ目の例題は複雑であり,プラットフォーム
が運転行動モデルに基づいて大規模シミュレーションを実行する能力を持
つことを示せた.
本研究は運転行動モデルを大規模交通シミュレーションに統合する方法を提
案し,その設計を実現するための実装を行った.シミュレーションを行ったと
ころ,いくつかの場合において,異なる運転行動を持つエージェントは異なる
経路を選択した.プラットフォームは大規模シミュレーションをミクロレベル
で実行できる.
iii
Introducing Driving Behavior Model into Large-scale
Multi-agent Traffic Simulation
Yoshiyuki NAKAI
Abstract
Agent-based simulation is recognized as a useful technology for understanding
social systems and social phenomena. In order to make a social simulation
have more realism, it is effective to assign a real human behavior to each agent
which makes up the virtual society. In addition, it is desirable to conduct a
simulation on as a large scale as the social phenomenon to reproduce. Thus
large-scale multi-agent simulation is a promising technology which modern so-
ciety demands.
There are so many changes in Japan’s road traffic such as aging of the
drivers or the widespread use of new traffic systems. New technologies are
needed for predicting the problems in the future road traffic or consideration of
a road traffic policy to solve the problems. Unlike pilot programs in real world,
simulations are useful in examining the effect of a road traffic policy as many
times as the policymaker wants.
There are two major approaches to a traffic simulation. One approach is to
reproduce the behavior of each vehicle driven by the microscopic model. Each
vehicle has the model which can determine its driving speed, lane change, turn-
ing left or right, street parking, and how to avoid obstacles. Another approach
is to reproduce traffic jams or routing of drivers on a large-scale road network.
Each road link has the model which can calculate the position of vehicles on
the link according to the relationship between traffic volume and density.
Road traffic is a social phenomenon in which a number of individual drivers
participate. Thus both a macroscopic point of view and a microscopic point of
view are needed when the policymaker examine the policy. The challenges of
this study are as follows.
1. Development of large-scale traffic simulation platform based on
driving behavior model
The first challenge is to develop a simulation platform which allows users
to see urban traffic from a microscopic point of view and a macroscopic
iv
point of view. The platform must be able to reproduce large-scale traffic
at the micro level. Each driver agent in the platform has its own driving
behavior model to recognize the environment and drive its vehicle.
2. Platform verification by example simulations
The second challenge is to show the potential of the platform by examples.
The configuration of an example simulation contains a road network and
configurations of agents. A road network consists of roads and intersections.
An agent configuration includes an OD (Origin-Destination) and a driving
behavior model.
The contributions of this study are as follows.
1. Design of an agent architecture and a road link architecture to
integrate micro model into macro model
First contributions is to design an agent architecture and a road link ar-
chitecture. The agent consists of two layers: a layer of routing and driving
behavior. The routing layer determine the route on the abstract road net-
work and the driving behavior layer drives the vehicle based on driving
behavior model on a road link. Each road link has a two-dimensional sur-
face in which vehicles run through. The platform is implemented using
a toolkit named MATSim-T which can effectively run a large-scale agent-
based traffic simulation.
2. Verification of introducing driving behavior model and execution
time of simulation
The platform was applied to two examples for verification. First example
was simple enough to predict the results of the simulation and confirm
that the platform worked properly. Second example was complex enough
to show the capability of running a large-scale simulation based on driving
behavior models.
This study proposed how to integrate a driving behavior model into a large-
scale traffic simulation and implemented the platform to realize the proposed
design. In some cases, agents with different driving behavior models choose
different routes during the simulation. The platform is able to run a large-scale
simulation at the micro level.
Introducing Driving Behavior Model into Large-scale
Multi-agent Traffic Simulation
Contents
Chapter 1 Introduction 1
Chapter 2 Traffic simulation models: micro and macro model 5
2.1 Traffic simulation based on micro model . . . . . . . . . . . . . . . . . 5
2.2 Traffic simulation based on macro model . . . . . . . . . . . . . . . . 8
Chapter 3 Platform for Large-scale traffic simulation based on
driving behavior model 11
3.1 Design of driver agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Design of road link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Process and data flow of the platform . . . . . . . . . . . . . . . . . . 18
3.4 Data used inside the platform . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 4 Simulations for platform verification 26
4.1 Introduced driving behavior model . . . . . . . . . . . . . . . . . . . . . 26
4.2 Two routes selection simulation without driving behavior model 27
4.3 Two routes selection simulation based on driving behavior model 31
4.4 Simulation of traffic in a real road network . . . . . . . . . . . . . . . 38
Chapter 5 Conclusion 44
Acknowledgments 46
References 47
Chapter 1 Introduction
Agent-based simulation is recognized as a useful technology for understanding
social systems and social phenomena. In order to make a social simulation
have more realism, it is effective to assign a real human behavior to each agent
which makes up the virtual society. In addition, it is desirable to conduct a
simulation on as a large scale as the social phenomenon to reproduce. Thus
large-scale multi-agent simulation is a promising technology which modern so-
ciety demands.
Japan is an aged society and has a great percentage of elderly drivers. Ac-
cording to the white paper on traffic safety in Japan 2009 1), people aged 65 and
older had the largest number of fatalities of any age group, 2,499, accounting
for more than 48.5% of all fatalities. This was the sixteenth year in a row that
this segment has remained at the top. In terms of the mode of transporta-
tion used by the accident victims aged 65 and older, pedestrians accounted for
47.7% of all, and the second largest number was of automobile, accounting for
23.5%. Compared with the past decade, injuries sharply decreased for the 16-24
year-old (70% down), but rose for the 65 and older (18% up).
Ministry of Land, Infrastructure, Transport and Tourism is promoting the
diffusion of Intelligent Transport Systems 2)(ITS) to improve the traffic envi-
ronment in Japan. ITS is a new traffic system which solves various problems
such as traffic accidents or traffic jams by connecting human driver and roads
and vehicles using leading-edge information and communication technologies.
For example, VICS sends road traffic information about traffic jams or traffic
regulations in real time so that the information is displayed on a car navigation
equipment. As of 2009 September, over 37.1 million units of car navigation sys-
tems have been sold, and the number of VICS on-board devices sold in Japan
has reached 25.1 million units. Electronic Toll Collection System (ETC) is a
system which aims to eliminate the delay on toll roads by collecting tolls elec-
tronically. The number of vehicles with transponder devices was only 51,6000,
1) http://www8.cao.go.jp/koutu/taisaku/h21kou haku/2) http://www.mlit.go.jp/road/ITS/
1
accounting for 0.9% of all vehicles at December 2001, but increased to 5,890,600,
accounting for 82.3%, at December 2009.
A century after the appearance of automobiles, switching from gasoline cars
to eco-friendly cars like hybrid gas-and-electric car is an inevitable worldwide
trend. Major automakers has began to sell their gas-and-electric cars and elec-
tric cars, and new entry into the market is increasing. Those eco-friendly cars
are so popular among consumers in Japan. According to the ranking of the new
vehicle sales volume 2009 1) released by Japan automobile dealers association,
Toyota’s hybrid car “Prius” has reached the top for the first time, and Honda’s
hybrid car “Insight” has reached eighth place.
There are so many changes in Japan’s road traffic as above. New technologies
are needed for predicting the problems in the future road traffic or consideration
of a road traffic policy to solve the problems. Unlike pilot programs in real world,
simulations are useful in examining the effect of a road traffic policy as many
times as the policymaker wants.
There are two major approaches to a traffic simulation. One approach is to
reproduce the behavior of each vehicle driven by the microscopic model. Each
vehicle has the model which can determine its driving speed, lane change, turn-
ing left or right, street parking, and how to avoid obstacles. Another approach
is to reproduce traffic jams or routing of drivers on a large-scale road network.
Each road link has the model which can calculate the position of vehicles on
the link according to the relationship between traffic volume and density.
Road traffic is a social phenomenon in which a number of individual drivers
participate. Thus both a macroscopic point of view and a microscopic point of
view are needed when the policymaker examine the policy.
Figure 1 shows how to realize traffic simulation based on driving behavior
model obtained from human subjects. Driver modeling step is to obtain driving
behavior model. Based on the method of participatory design [1], a method of
obtaining a driving behavior model from a human subject operating a driving
simulator was proposed[2, 3].Simulation and analysis step is to conduct a
1) http://www.jada.or.jp/contents/data/ranking/pdf/ranking2009.pdf
2
Driving Simulator
DomainKnowledge
Driving Log
Traffic Simulator
DrivingBehavior
Model
Driver Modeling Simulation and Analysis
Subjects Traffic Policy Maker
Figure 1: Traffic simulation based on driving behavior model obtained from
human subjects
simulation based on driving behavior model and analyze the results by a traffic
policy maker.
In the driver modeling step, driving log can be acquired from the driving
simulator and domain knowledge from the subject by interview. Subjects are
asked reasons and their state of mind for each operation while driving the car. a
driving behavior model, which is able to drive a car recognizing the environment,
is made from driving log and domain knowledge. In the simulation and analysis
step, obtained driving behavior model is used for a large-scale traffic simulation.
Thus a large-scale traffic simulator based on driving behavior model is needed
for this step.
The challenges of this study are as follows.
1. Development of large-scale traffic simulation platform based on
driving behavior model
The first challenge is to develop a simulation platform which allows users
to see urban traffic from a microscopic point of view and a macroscopic
point of view. The platform must be able to reproduce large-scale traffic
at the micro level. Each driver agent in the platform has its own driving
behavior model to recognize the environment and drive its vehicle.
2. Platform verification by example simulations
The second challenge is to show the potential of the platform by examples.
3
The configuration of an example simulation contains a road network and
configurations of agents. A road network consists of roads and intersections.
An agent configuration includes an OD (Origin-Destination) and a driving
behavior model.
Chapter 2 introduces models and purposes of existing simulators which be-
long to either microscopic approach or macroscopic approach. Chapter 3 de-
scribes the design of the platform for large-scale traffic simulation based on
driving behavior model. Chapter 4 shows simulation results and reviews for
verification of the developed platform. Chapter 5 is the conclusion of this the-
sis.
4
Chapter 2 Traffic simulation models: micro and
macro model
There are two major approaches to a traffic simulation: a microscopic approach
and a macroscopic approach. “Driving behavior model” and “Large-scale traffic
simulation” are the key words of this study. Driving behavior model has been
studied in the area of traffic simulation based on micro model. Large-scale
traffic simulation has been studied in the area of traffic simulation based on
macro model.
This chapter introduces models and purposes of existing simulators which
belong to either microscopic approach or macroscopic approach.
2.1 Traffic simulation based on micro model
This approach aims to reproduce the behavior of each vehicle driven by the
microscopic model.
HESTIA
To address traffic problems, we generally build more roads, but an alternative
solution is to increase existing roads’ capacity by intelligent transportation sys-
tems (ITS) infrastructure. ITS allows autonomous vehicles to run cooperatively
with each other.
In a collaborative driving system (CDS), the coordination of each vehicle
controller’s actions must be resolved. To solve the problem, each vehicle be-
longs to a platoon of more than ten vehicles. Each platoon has the leader and
other vehicles follow him. The important task in a collaborative driving sys-
tem is to coordinate vehicles during the entrance and exit of vehicles from the
platoon. CDS should communicate information about obstacles or high decel-
eration ahead, thus allowing platoon members to follow each other at a closer
distance. These platoons of automated vehicles increase traffic throughput and
lowering fuel consumption due to an average higher cruising velocity and lower
accelerations[4].
[4] proposed a driver model which consists of three layers as shown in figure
2 for CDS. Guidance layer is the bottom layer which contains environment
5
Traffic Control Layer
Management Layer
desired state
criteria
actuatorssensors
otheragents
otheragents
communicationsoutput
communicationsinput
sensed data
communicationswith road
Guidance Layer
Agent
Figure 2: Layered architecture of driving agent for collaborative driving system
sensors and operates an accelerator and a decelerator and a steering wheel.
Management layer is the middle layer which communicates with surrounding
vehicles and decides how to run cooperatively. Traffic control layer is the top
layer which exists on the road and constrains lower layer to obey traffic signs,
traffic signals and observe traffic rules. Traffic layer gives criteria to management
layer and get vehicle information from management layer. Management layer
gives desired state to guidance layer and get sensed data from guidance layer.
This model was implemented and evaluated on a simulator named HES-
TIA developed by Universite Laval. A vehicle in HESTIA includes longitudinal
and lateral vehicle dynamics, wheel model dynamics, engine dynamics, torque
converter model, automatic gear shifting, throttle/brake actuators and steering
wheel actuator. Each vehicle has an interface that allows a driver to control
accelerator/brake actuators, steering wheel actuator, external and internal sen-
sors, and communication receiver/transmitter.
INSPECTOR
INSPECTOR is a microsfopic traffic flow simulator of an urban road network
developed by Nagoya University. In INSPECTOR1), Each vehicle has a model
which can reproduce the speed of itself, lane change, turning left or right at
1) http://www.genv.nagoya-u.ac.jp/ge1/nakamura/research/INSPECTOR/
6
intersections, street parking, and avoiding obstacles. This model can reproduce
not only each vehicle’s behavior but also traffic jams caused by vehicles waiting
for loading, street parking, or vehicles searching for parking lots in urban traffic.
Each vehicle has not only a vehicle behavior model but also a user behavior
model. The user model is able to decide where to park and select the route etc.
A driver stochastically chooses the route from three possible routes considering
the travel time to the goal, the number of lanes in the route, and the number
of times turning left or right. The user model can reproduce each driver’s
selection of parking place, the duration of parking, and the route selection.
INSPECTOR is applicable to the evaluation of traffic policies such as a control
policy of street parking in urban streets, street improvement, and information
service about traffic jams.
The amount of traffic at intersections, the travel time in arterial roads or nar-
row streets. Barometers such as the number of loading and unloading vehicles,
street parking vehicles on each street were reproducible results. INSPECTOR
was used for the verification of the policy that introduces transit mall into the
section of the street between Hirokoji-fushimi intersection and Sakae intersec-
tion in Nagoya City. The simulation time was five hours from noon to 5 pm
using the road network with 358 nodes and 857 links. Policies like one-way
street regulations, street parking regulations, intersection improvement were
examined.
tiss-NET
tiss-NET [5] is a local traffic simulator developed by Saitama University. Roads
are modeled as a sequence of meshes. The length of a mesh is five meters.
Vehicles run based on car following model through the meshes. Vehicles also
includes route selection model. Thus the simulator is applicable to a network
of roads.
tiss-NET is suitable for a simulation of an urban road network and can be
used for the prior evaluation of traffic policies like intersection improvements,
street improvements, traffic regulations, traffic signal controls, transportation
planning around large-scale retail store, and street parking regulations.
7
tiss-NET 2006 1) is a release version of tiss-NET developed by LITEC Corpo-
ration. tiss-NET 2006 can load GIS data and create the network for simulation.
Attributes like the number of lanes, speed limit, signal control, one-way regu-
lation can be assigned to the network.
Statistics on average travel time of vehicles by the section between selected
nodes can be displayed. Each vehicles’s information about vehicle type, travel
time, travel distance, and route are output. It takes two and a half minutes
to run a simulation with 23 links, 24 nodes, 40 minutes simulation time, and
3400 vehicles on the machine which has Pentium 4 2.4GHz processor and 2GB
memory.
2.2 Traffic simulation based on macro model
This approach aims to reproduce traffic jams or routing of each vehicle on a
large-scale road network.
SOUND
SOUND[6] is a traffic flow simulator for a wide area road network. SOUND/4U2)
is a release version of SOUND. In SOUND/4U, each road link has a macro model
which calculates the position of vehicles on the link based on the relationship
between traffic volume and capacity. The computational load of this model is
low enough to apply the model to a large-scale network. Each vehicle has also
a dynamic/static route selection model. Those two models work together to
move the vehicles.
Figure 3 shows how each road link hold vehicles on it. Vehicles on a link
exists in either a running queue or a waiting queue. A vehicle coming to a
new link is added to the running queue first. When the elapsed time since the
entrance is longer than free speed travel time, the car is moved to the waiting
queue. The upper limit of the number of vehicles on the road link is jam density.
In order to strictly manage the density based on the relationship between traffic
volume and capacity, Simplified Kinematic Wave[7] algorithm was implemented
in addition to queue based calculation.
1) http://www.litec.co.jp/product/tiss/tiss-2006.html2) http://www.i-transportlab.jp/products/sound/
8
RoadNode
RoadLink
RunningVehicles
WaitingVehicles
RoadLink
RunningVehicles
WaitingVehicles
Figure 3: Road link as two FIFO queues
Least cost route selection model or logit choice model is available for each
vehicle. Vehicles have to choose their routs when they depart, enter a road link,
and the cost of road link is updated. The cost of a road link is the sum of the
length of the link, the current travel time, the number of times turning left or
right, and the toll fare. The costs of road links are updated once every five to
fifteen minutes.
SOUND/4U is able to examine the traffic policies like change of traffic reg-
ulations such as right turn prohibition, parameters of signal control, temporary
road blocking or entrance restriction, or to recommend drivers to change routes
and take detours by information supplement.
MATSim-T
MATSim-T1) is a toolkit for implementing an agent based large-scale traffic
simulation. MATSim-T is a open source software developed by Universitat
Berlin and Swiss Federal Institute of Technology Zurich. MATSim-T is superior
to other traffic simulators as follows[8].
• Computational savings when compared to the calculation and storage of
large multidimensional probability arrays.
• Larger range of output options, from overall statistics to information about
each synthetic traveler in the simulation.
• Explicit modeling of the individuals’ decision-making processes.
MATSim-T is used for a traffic simulation of the entire area of Switzerland
in the morning rush hour. The simulation was conducted on the road network
1) http://www.matsim.org/
9
of the entire Switzerland using ODs1) provided by the regional planning division
in Switzerland. The results of the simulation was compared with instrumental
data of the real traffic and found to be at least as good as existing methods[9].
The primary objective of MATSim is to simulate traffic flows over extensive
areas and to optimize travel demands. Within a simulation, agents learn their
route running through following steps:
1. Search the initial route using road travel time based on free speed.
2. Move along the road network along the route.
3. Score the executed route based on the actual travel time.
4. Decide the next route by choosing from executed routes with scores or
searching the route using road travel time in the previous simulation.
5. Return to step 2.
A road network is implemented as the network of FIFO queues like figure
3. This implementation is so simple that large-scale agent based simulation can
be realized efficiently, but it cannot run realistic microscopic traffic simulations.
For example, there is no way to consider roads’ alignments or interactions among
vehicles, which are needed for modeling local driving behaviors.
1) Origin-destination of agents
10
Chapter 3 Platform for Large-scale traffic sim-
ulation based on driving behavior
model
Vehicles in a simulation based on microscopic model consists of layers and is
capable of complex decision as shown in figure 2. Vehicles in a simulation based
on macroscopic model move from a queue to another queue as shown in figure
3. The queue based model is simple enough to run a large-scale simulation.
In this study, the platform which allows users to analyze a traffic flow from
both the microscopic and macroscopic points of view was developed. Users
can analyze the traffic focusing on the behaviors of the drivers and viewing the
entire city at once. Such a platform requires integration of a micro model into
a macro model.
In this chapter, the design of a driver agent and the design of a road link
required for introducing driving behavior model into large-scale multi-agent
traffic simulation are proposed. The process and input/output of the platform
is also described.
The platform is implemented using MATSim described in Chapter 2 as a
macroscopic traffic simulation. MATSim-T can run large-scale traffic simulation
efficiently.
3.1 Design of driver agent
An agent of this platform is a driver of a vehicle and called driver agent. A
driver agent is independent from a vehicle so the driver agent can drive any
other vehicle. Figure 4 shows the architecture of a driver agent which consists
of a layer for route selection and a layer for driving behavior. The design of
layered architecture comes from traffic simulations based on microscopic model
in Chapter 2.
The routing layer gets a road travel time from the driving behavior layer.
The road travel time is the required time for going through a certain interval of
the road. A driver agent communicate with other driver agents and send/receive
11
Routing Layer
route
from otheragents
to otheragents
traveltime
operation
traveltime
travel time
Driving Behavior Layerfromenvironment
Driver Agent
road
other vehicles
to itsvehicle
Figure 4: Driver agent composed of routing layer and driving behavior layer
the road travel times. The communication of the road travel times is done by
routing layer. The routing layer uses road travel times to generate the least
cost path in terms of the whole travel time from the origin to the destination.
The least cost path is sent to the driving behavior layer.
The driving behavior layer gets a route from the routing layer. The route
is defined as a set of road links. When the driver agent arrived at the end of a
road link, the agent is moved to the next link as defined in the route. In the
road link, each vehicle exists on the two-dimensional road. Since vehicles on
the two-dimensional road can pass the other cars and run at the desired speed,
which is different from the case of the queue model, vehicles do not leave the
link in order of arrival.
The routing model which has an important role in the routing layer and the
driving behavior model which has an important role in the driving are described
below. An agent has a routing model for selecting the path on the wide-are road
network and a driving behavior model for driving the vehicle in the local traffic
conditions.
Routing model of agent
Each agent has a routing model. There are four types of routing model of the
agent in this platform. Types of agents’ routing models are as follows:
1. ReRoute
An agent search the new least cost path. The cost of each link for search
12
is the road travel times in the previous simulation. The road travel time is
the required time running through the road, which is updated every fifteen
minutes. The new least cost path is the next plan. Even if the route is
the same route in existing plans, it is viewed as the different plan since
the route was found based on the different road link costs. In the initial
routing, the road travel time is calculated as dividing the length of the road
link by the free speed of the vehicle since the road travel time is unknown
before the first iteration.
2. BestScore
An agent chooses the highest scored plan from existing plans.
3. KeepLastSelected
An agent chooses the same plan as it chooses in the previous iteration.
4. Random
An agent randomly chooses a plan from the existing plans.
All agents have the four types of routing model described above, and each
agent randomly uses a routing model from the four types at each iteration. The
platform configures the percentage of the number of agents selecting each plan.
For example, the configuration is like that the percentage of the agents using
ReRoute is 10% and BestScore is 90 %.
Driving behavior model of agent
Each agent has a driving behavior model. This platform allows each agent
to have an individual driving behavior model. The driving behavior model of
each agent has common three steps as described below. Agents recognize the
environment, interpret the situation and decide what to do next, and operate
the vehicles.
1. Recognition
An agent recognizes the environment like the condition of its vehicle, the
condition of the vehicles around it, and the road alignments. The condi-
tions of its vehicle, which are available to the agent, are the position, the
velocity, the acceleration, and the current lane. The conditions of the other
vehicles, which are available to the agent, are the position, the velocity, the
acceleration. The agent can get the information of the nearest vehicles in
13
front of it, on the left, on the right, or behind it. The agent can get the
information about the current road link. Each road link has attributes like
length, width, the number of lanes, curvature, and slope as shown in the
table 3.
2. Determination
An agent decides what to do next from the information acquired during
the recognition step. Rules of decision making can be implemented by
users of the platform. The combination of conditions acquired during the
recognition step can define a new condition. For example, “Right lane is
empty” can be defined as “The difference between the position of the car
in front on the right and the position of its car is more than 20[m].” and
“The difference between the position of the car in front on the left and the
position of its car is more than 20[m].”
3. Operation
An agent operates the accelerator pedal, the brake pedal, and the steering
wheel of the vehicle based on the results of the determination. An agent in
this platform is not a vehicle but a driver. Operation is the step in which
drivers drive the vehicle.
3.2 Design of road link
Vehicles driven by agents with driving behavior model run through the flat
surface road. The two-dimensional road exists in each road link. The two-
dimensional road in a road link is independent from the road of another road
link during the calculation of each simulation step.
Figure 5 shows vehicles on the road link. Running vehicles exist on the
two-dimensional road. Vehicles near the intersection exist in the queue. The
queue based design comes from traffic simulators based on macroscopic model.
If the next road link is full of entering vehicles, then those vehicles have to wait
in the queue until the next road link is able to accept them. The queue allows
the platform to connect the road links without the complex simulation at the
intersection.
While each vehicle running through the two-dimensional road, the driving
14
RoadNode
RoadLink
RunningVehicles
WaitingVehicles
RoadLink
RunningVehicles
WaitingVehicles
Figure 5: Vehicles on the road link
behavior layer decides next driving behavior from the condition of its vehicle, the
conditions of vehicles around it, and the current road. The driving behavior
layer operates the accelerator pedal, the brake pedal, and the steering wheel
based on the decided driving behavior. The driving behavior layer record the
departure/arrival time for each road link, and calculate the road link travel
time, and send it to the routing layer.
In this platform, microscopic model is integrated into macroscopic model as
above by designing each agent to have both a routing layer and a driving layer
and designing each road link to have a two-dimensional road and a queue for
waiting vehicles.
Sequence diagram of traffic flow simulation
Figure 6 is a sequence diagram which shows messages among major objects
during the traffic flow simulation. There are six major objects as follows:
• TraficFlowSimulator (Main body of traffic flow simulator)
• SimulationStep (A simulation run every unit of time)
• Node (A road node in a road network)
• Link (A road link in a road network)
• Vehicle (A vehicle moving on the road network)
• Driver (A driver which drives the vehicle)
In a traffic flow simulation, there is a loop executed every unit of time. The
loop includes a loop for each node and a loop for each link. The loop for each
node has a loop for vehicles entered to the node. The loop for each link has a
loop for vehicles entered to the link. The process of traffic flow simulation is
proportional to the number of road nodes, road links, and vehicles on the road.
15
Here is the details about messages among major objects:
TrafficFlow
Simulator
Simulation
StepNode Link Vehicle Driver
loop: [SimulationStep : SimulationSteps]
loop: [Node : Nodes]
loop: [Vehicle : Vehicles]
loop: [Link : Links]
loop: [Link : Links]
1. run()
2. moveNode()
4. moveVehicle()
3. getWaitingVehicles()
Vehicles
7. getDriver()
Driver
6. moveLink()
5. getNextLink()
Link
loop: [Vehicle : Vehicles]
8. driveVehicle()
9. getEnvoronment()
10. doOperation()
11. update()
Environment
Figure 6: Sequence diagram of a traffic flow simulation
1. TrafficFlowSimulator executes SimulationStep.SimulationStep is executed
once per unit of time in the simulation. The unit of time in the platform
16
is 0.5 seconds by default.
2. SimulationStep starts the process of Node. The process of Node is repeated
for each Node in the road network.
3. Node gets Vehicles ready for leaving a Link whose end point is this Node.
4. Node moves ready Vehicles to the next Link. If the Link is full of Vehicles,
Node does not move Vehicles.
5. Vehicle gets the next Link from Driver.
6. SimulationStep starts the process of Link. The process of Link is repeated
for each Link in the road network.
7. Link gets Driver who drives the Vehicle from each Vehicle running on the
Link.
8. Link makes Driver drive Vehicle.
9. Driver gets Environment from Link. This process is the recognition of the
environment which is the input to the driving behavior model.
10. Driver drives Vehicle. The operation is calculated by driving behavior
model.
11. Vehicle tells Link its condition. The condition is like the position and the
velocity.
Road on the two-dimensional surface
Each road link has a road on the two-dimensional surface and a queue of vehicles
ready for leaving the link. In the microscopic traffic simulator, each road link has
two queues of running vehicles and waiting vehicles. This platform replaced the
queue of running vehicles with the road on the two-dimensional surface in order
to calculate the vehicle behavior on the raod link based on driving behavior
model.
Figure 7 is an example of road on the two-dimensional surface. A black
circle is a road node and an arrow is a road link. Rectangles are placed on the
left of the road links to express the road shape. If a road link is bidirectional,
the link is like Link-1 and Link-2 with rectangles on both sides. If a road link
has only one lane, the link is like Link-2. If a road link has two lanes, the link
is like Link-1 and Link-3. Since Link-3 is one-way, it has only a rectangle on
the left. A road node, which is an intersection, does not have a road on the
17
two-dimensional surface.
Link-1
Link-2
Link-3
Figure 7: Example roads on the two-dimensional surface
When a agent enters a road link, the agent is put on the two-dimensional
surface. The agent moves on the surface based on its driving behavior model.
When the agent comes to the end of the rectangle road on the surface, it is
moved to the queue of vehicles waiting for the next road link. The process of a
road node is to move a vehicle from the waiting queue to the two-dimensional
surface on the next road link. The process of a road link is to move a vehicle
on the two-dimensional surface and move a vehicle at the end of the rectangle
road to the waiting queue.
3.3 Process and data flow of the platform
Figure 8 shows the main process and the data flow of the platform. The platform
iterates three processes: traffic flow simulation, scoring, replanning. The driving
behavior layer of the agent is executed during the traffic flow simulation. The
routing layer of the agent is executed during the scoring and the replanning.
An iteration corresponds to one day of the simulation time.
Input to the platform are a road network and initial plans. The initial plan
18
3. Replanning
2. Scoring1. Traffic FlowSimulation
Snapshots
InitialPlans
RoadNetwork
to Viewer
Iteration
Data Flow Data Process
Events
Plans ScoredPlans
Figure 8: Process and data flow of the platform
of an agent is the least cost path calculated on the road network to satisfy the
OD of the agent. The cost is defined as the length of road link divided by the
free speed. The free speed is the speed of a vehicle which freely runs through
the road without any disturbance, which is defined for each road link.
While the platform iterates traffic simulation, scoring, and replanning, each
agent keeps learning by searching for a much better plan which satisfies its OD.
The score of the plan depends on how long it takes to execute the plan; shorter
plan is better. The actual travel time depends on the density of roads caused
by the route selection of other agents. Thus the plan which is thought to be
the best is not necessarily the best plan.
Strictly speaking, each agent’s learning never ends, so users of the platform
must decide when to stop the iterations. When some routes are found by agents
and the number of agents for each route becomes stable, it is the time to stop
the simulation.
Output from the platform are the snapshots and the agents’ learned plans.
Both snapshots and the plans are dumped every iteration. The snapshots are for
the viewer software as described later in this section. The number of iterations
19
required for enough learning of agents depends on the size of the simulation.
Factors of the size are the number of agents, road links, and simulation time.
Three processes of one iteration is described below. Data used by those
processes are described in the next section in detail.
1. Traffic Flow Simulation
Input data are a road network and agents’ plans. Output data are events
and snapshots. Traffic flow simulation is conducted based on the driving
behavior model. The driving behavior layer works for the simulation based
on driving behavior model. An event is a record of an agent’s action with
the time and the place (road link). A Snapshot is made up of records of
agents’ positions and conditions at each simulation time step. Snapshots
are playable by the viewer software in the platform.
2. Scoring
Input data are events. Each agent has to score its executed plan. The
routing layer works for the scoring process. The score is calculated based
on the actual travel time in the previous traffic flow simulation. The travel
time is computable from the departure time and the arrival time recorded
in events.
3. Replanning
Input data are scored plans and events. Each agent has to reconsider its
plan. The routing layer works for the replanning process. Existing plans are
scored based on the results of the past traffic flow simulation. For searching
a new plan, previous road link times are available since the routing layer can
communicate with other agents and the driving behavior model of itself.
The road travel time is computable from the leaving/entering time for each
road link recorded in events.
The input to the platform are as follows.
Road Network
A road network is a set of roads (road links) and intersections (road nodes) in
the area to simulate. The road network is used by both traffic flow simulation
and replanning.
20
Initial Plans
The initial plan of an agent is the least cost path calculated on the road network
to satisfy the OD of the agent. OD of the agent is the combination of the start
and the goal. The start and the goal is specified by the road link ID.
The output from the platform are as follows.
Snapshots
A Snapshot is made up of records of agents’ positions and conditions at each
simulation time step. A record in the snapshot consists of an agent’s position,
velocity, and direction as shown in table 1.
Table 1: Record in Snapshot
Type1) Attribute Notes
long Simulation time Elapsed time in ms from 0h0m0s0ms
int Agent ID
double Latitude North latitude, Tokyo Datum, in second
double Longitude East longitude, Tokyo Datum, in second
float Velocity in meters/second
float Direction East is 0, counterclockwise rotation, in rad
The snapshot is generated every 0.5 seconds which is the length of one step
of the simulation in this platform. The viewer software plays snapshots filling
the gap between the steps of the simulation.
Learned Plans
Learned plans are the plans exported by replanning process at the last iteration.
Plan is described in the next section.
3.4 Data used inside the platform
In this section, data inside the platform are described. Figure 9 is the class
diagram which shows relations among data during the traffic flow simulation.
A TrafficFlowSimulator has a RoadNetwork. A RoadNetwork has Nodes and
1) Type notation of Java
21
Links. A Link starts at a node and ends at a Node. There are Vehicles on a
Link. A Vehicle is driven by a Driver. A Driver has Events and Plans. A Plan
has a Score.
RoadNetwork
Node Link
Vehicle Driver
Plan
Score
Event
TrafficFlowSimulator
1
*
1
*
1
*
1
*
1
1..*
1
1 1
1
1
1
has
has has
has
drives
starts at
ends at
has
has
has
Figure 9: Class diagram of relations among data during traffic flow simulation
Road network
A Road network consists of road nodes and road links. Table 2 shows the
major attributes of a road node. Each road node has ID and two-dimensional
coordinate. Table 3 shows the major attributes of a road link. Each road link
has ID, IDs of nodes on both ends, length, width, the number of lanes, capacity,
curvature, and slope. A road link is directed and has ordered pairs of nodes:
source node and target node. A Two-way street is defined as two road links;
each link is 180 degrees from another link.
22
Table 2: Major attributes of road node
Attribute Meaning
id ID of the node
x, y two-dimensional coordinate, in meters
The abstract architecture of a road network connecting road links is used by
agents’ routing models. The attributes like length, width, curvature, and slope
are used by agents’ driving behavior models.
Table 3: Major attributes of road link
Attribute Meaning
id ID of this road link
from ID of the source node
to ID of the target node
length Length in meters
width Width in meters
permlanes The number of lanes
freespeed Free speed of vehicles in meters/second
capacity The limit number of vehicles per hour
curvature Curvature of the road
slope Slope of the road
Plan
A Plan is a route which satisfies the OD of an agent. A route is ordered IDs of
road nodes. An agent creates at most one Plan per iteration. At each iteration,
each agent selects a plan in the replanning process and executes the plan in the
traffic flow simulation. Plans executed in the traffic flow simulation is scored
based on actual travel times of the plans. At the end of the simulation, agents
have more than one plan.
23
Event
Event is a record of agent’s action with time and place, which is defined as a
set of simulation time, ID of road link, and the type the action. There are five
types of actions:
1. The agent arrived at the goal link at the time.
2. The agent left at the start link at the time.
3. The agent was waiting at the road link because the capacity of the next
link is not enough at the time.
4. The agent entered the road link at the time.
5. The agent left the road link at the time.
Users of the platform can analyze the Events to know:
• Traffic volume of each road link
Traffic volume of each road link is the number of vehicles passing through
the road link. The number of passing vehicles is countable by selecting
the leave events of the agents which occurred at the target road link. The
number of passing vehicles for each period of time is countable by selecting
the agents’ leave events which occurred at the target road link at the period
of time.
• Driving distance of each agent
Driving distance of each agent is the sum of the lengths of the road links
which the agent passing through. Road links which the agent passing
through can be identified by selecting the leave events of the agents which
is an action of the target agent.
• Travel time of each agent
Travel time of each agent is the time from the departure to the arrival
at the goal. The departure/arrival time of each agent can be identified
by selecting the agents’ departure/arrival event which is an action of the
target agent.
• Average driving speed of each agent
Average driving speed of each agent is driving distance of each agent divided
by travel time of each agent.
• Route selection of each agent
24
The route selected by an agent can be identified by selecting the agent’s
leave events, each of which includes a road link.
• Average driving distance of agents having the same OD
Agents having the same OD should be specified first, and the average driv-
ing distance of them can be calculated.
• Average travel time of agents having the same OD
Agents having the same OD should be specified first, and the average travel
time of them can be calculated.
• Ratio of each route selected by agents having the same OD
Agents having the same OD should be specified first, and the route selection
of them can be countable.
Score
Agents remember the score of each plan when the plan is executed. Score of a
plan represents how good the plans is to the agent. The plan which requires
shorter travel time is better plan. Score is calculated based on the travel time
in the previous traffic simulation so it is not sure that the highest scored plan is
the best in the next traffic simulation. The travel time of the plan is the time
from the departure of the agent to the arrival of the agent.
25
Chapter 4 Simulations for platform verification
In this chapter, simulations using the platform are shown. These simulations
aim at the verification of the platform.
4.1 Introduced driving behavior model
The driving behavior model introduced to simulations in this chapter is Optimal
Velocity Model[10] which is one of the car following models. Rules for lane
change in the case of slow car in front are also defined.
Optimal velocity model
The acceleration of a vehicle is the difference between the optimal velocity and
the current speed.
Let n denote the order of a vehicle, and xn denote the position of the vehicle
n, the acceleration of the vehicle n:
d2xn
dt2= a
(U(xn−1 − xn) − dxn
dt
)(1)
Note that a is an index of sensitivity of the driver agent, and U is the optimal
velocity as a function of the distance h between two vehicles:
U(h) =u
2
{tanh
(h
8− 2
)+ tanh(2)
}(2)
Note that u is the desired speed of the driver agent. For example, let u = 50,
then the graph of the optimal velocity function U is like figure 10. If the gap
between vehicles is 0, then the optimal velocity is 0; as the gap becomes bigger,
the optimal velocity becomes bigger; the desired speed is the limit of the optimal
velocity function.
Rules for lane change
Thanks to the optimal velocity model, agents can avoid crashing into the car
in front and follow the car in front. However, there is another way to avoid
crashing besides deceleration by braking. It is lane changing. There are two
statements which must be true for the lane change:
1. “An agent has to decelerate to follow the car in front.”
The acceleration of the agent is calculated by the optimal velocity model.
26
10
20
30
40
50
2010O 30 40 50h[m]
U(h)[km/h]
Figure 10: Optimal velocity function when u = 50
So if the equation (1) is negative, then the statement is true; otherwise,
the statement is false.
2. “The lane on the left or right has enough space.”
“The lane on the left has enough space” is defined as “The gap between
the vehicle diagonally forward left and the agent is more than 15 [m].” and
“The gap between the vehicle diagonally backward left and the agent is
more than 15 [m].” “The lane on the right has enough space” is defined as
the same.
When these two statements are true, the agent change the lane with a fixed
probability. Let us call the probability “lane change probability”. Lane change
probability is a factor of characteristics of the agent.
4.2 Two routes selection simulation without driving be-
havior model
In this simulation, agents have to choose one route from two routes. The con-
figuration is simple so that the results of the simulation can be predicted. This
simulation is not based on driving behavior model in order to compare with
the simulation based on driving behavior model. Each agent has no model for
vehicle behavior. Each road link has a macro model for vehicle behavior.
27
Configuration
Figure 11 shows the road network which has two routes from the extreme left
node to the extreme right node. The number next to each link is the number
of lanes. There are three lanes on the road link from the extreme left node to
the branch point. Let us call the upper route “Route-1” and the under route
“Route-2”. Route-1 has one lane and Route-2 has two lanes. There are three
lanes from the meeting point to the extreme right node.
Origin
Route-1
Route-2
3 3
1 1
2 2Destination
Figure 11: OD of agents and the number of lanes on the two routes network
There are 100 agents leaving the node on the left extreme at intervals. The
limit number of vehicles for each lane per hour is 3,000. The limit number of
vehicles, 9,000 vehicles per hour, leave the node on the left extreme. Roads
having one lane are capable of 3,000 vehicles per hour, and roads having two
lanes are capable of 6,000 vehicles per hour. So if the number of agents for each
route is imbalanced, the route with too many vehicles will be jammed and it
takes longer time to go through the route than another route. 1)
ODs of all agents are the same: from the node on the left extreme to the
right extreme. The number of iterations are 100, from the iteration 0 to the
iteration 99. In the replanning process for each iteration, 10% of the agents use
ReRoute model and 90% of the agents use BestScore model.
Three configurations of initial plans for each agent are examined.
1) When the capacity of the road link is large enough compared to the number of vehiclesentering the road link, the travel time has nothing to do with the route selection of eachagent.
28
1. Route-1: 100 agents, Route-2: 0 agents
2. Route-1: 50 agents, Route-2: 50 agents
3. Route-1: 0 agents, Route-2: 100 agents
Expectation
The results of the simulation are predictable since the road network is simple
and ODs and departures of agents are completely controlled. The expectations
are as follows:
If the number of agents for each route is imbalanced, the route with too
many vehicles will be jammed and it takes longer time to go through the route
than another route. The route selected by too many vehicles will not be selected
by ReRoute model or BestScore model during the next replanning, and agents
changed the route to another route. Eventually, the number of agents for each
route will stable at the ratio of the number of lanes, 1:2.
Review of the results
Figure 12 is the graphs showing the number of agents for each route. Each
graph shows the result of three different configurations from the top to the
bottom: Route-1: 100 agents, Route-2: 0 agents; Route-1: 50 agents, Route-2:
50 agents; Route-1: 0 agents, Route-2: 100 agents.
The graph legends show the color of Route-1 and Route-2. The horizontal
axis is the iteration, and the vertical axis is the number of agents for each routes
at the iteration.
1. Route-1: 100 agents, Route-2: 0 agents
From iteration 0 to around iteration 10, the number of agents which choose
the Route-1 decreased and the number of agents which choose the Route-
2 increased. From around iteration 20, the number of agents for each
route oscillated. The average number of agents which choose Route-1 from
iteration 19 to iteration 99 was 31; the average number of agents which
choose Route-2 was 69. The ratio of 31:69 is about 1:2, thus the result is
said to be correct.
2. Route-1: 50 agents, Route-2: 50 agents
From iteration 0 to around iteration 5, the number of agents which choose
the Route-1 decreased and the number of agents which choose the Route-
29
0 20 40 60 80Iteration
Numberof Agents
1. Route-1: 100 agents, Route-2: 0 agent (Initial Plans)
2. Route-1: 50 agents, Route-2: 50 agents (Initial Plans)
3. Route-1: 0 agents, Route-2: 100 agents (Initial Plans)
0
20
40
60
80
100
0
20
40
60
80
100
0
20
40
60
80
100
Route 2
Route 1
0 20 40 60 80Iteration
Route 2
Route 1
0 20 40 60 80Iteration
Route 2
Route 1
Figure 12: The number of agents for each route (Without driving behavior
model)
2 increased. From around iteration 10, the number of agents for each
route oscillated. The average number of agents which choose Route-1 from
iteration 19 to iteration 99 was 30; the average number of agents which
choose Route-2 was 70. The ratio of 30:70 is about 1:2, thus the result is
30
said to be correct.
3. Route-1: 0 agents, Route-2: 100 agents
From iteration 0 to around iteration 5, the number of agents which choose
the Route-2 decreased and the number of agents which choose the Route-1
increased. From around iteration 5, the number of agents for each route
oscillated. The average number of agents which choose Route-1 from iter-
ation 19 to iteration 99 was 30; the average number of agents which choose
Route-2 was 70. The ratio of 30:70 is about 1:2, thus the result is said to
be correct.
It was confirmed that the platform works correctly in the case of simulations
without driving behavior model. The simulations in this section showed that
regardless of initial plans given to agents, the number of agents converge at the
ratio of the number of lanes of each route.
4.3 Two routes selection simulation based on driving be-
havior model
In this section, the driving behavior model is introduced to the simulation of
two routes selection already shown in section 4.2 Each agent has the driving
behavior model which determines the vehicle behavior.
Configuration
The road network used in this simulation is the same as section 4.2. The limit
number of vehicle for each lane per hour is 3,000. Types of agent are defined as
the combination of the desired speed and the lane change probability described
in section 4.1.
The desired speed is 30 [km/h] or 60 [km/h] and the lane change probability
is 0.1 or 0.4. There are four types of agents. The number of agents is 100
and the number of each type is 25. To avoid the same type of agents clinging
together, four types of agents leave the start point one after the other. Four
types of agents are called as shown in table 4. ODs of all agents are the same
from the node on the left extreme to the node on the right extreme. The number
of iterations is 100 from the iteration 0 to the iteration 99.
Two different configurations of initial plans are examined.
31
Table 4: Agent Types
Type of Agent Desired Speed[km/h] Lane Change Probability
Slow Cautious 30 0.1
Slow Aggressive 30 0.4
Fast Cautious 60 0.1
Fast Aggressive 60 0.4
1. Route-1: 100 agents, Route-2: 0 agents
2. Route-1: 0 agents, Route-2: 100 agents
Expectation
This simulation is not as simple as the simulation in section 4.2 because agents
have four different types of driving behavior model. So it is a little more difficult
to predict the result of the simulation.
If a fast agent runs behind a slow agent, the fast agent has to run at the
speed of the slow agent. Thus fast agents choose Route-2 more often because it
is possible for them to overtake slow agents and the travel time is shorter than
Route-1. Among fast agents, aggressive agents may choose the Route-2 more
often than cautious agents. Slow agents choose both routes because there is
no difference between Route-1 and Route-2 for these agents in terms of travel
time.
Review of the results
Figure 13 includes two graphs each of which shows the number of agents for each
route. The horizontal axis is the iteration, and the vertical axis is the number
of agents for each routes at the iteration. Each graph shows the result of two
different configurations: Route-1: 100 agents, Route-2: 0 agents; Route-1: 0
agents, Route-2: 100 agents.
1. Route-1: 100 agents, Route-2: 0 agents
From iteration 0 to around iteration 10, the number of agents which choose
the Route-1 decreased and the number of agents which choose the Route-
2 increased. From around iteration 20, the number of agents for each
route oscillated. The average number of agents which choose Route-1 from
32
iteration 19 to iteration 99 was 35; the average number of agents which
choose Route-2 was 65. The ratio of 35:65 is about 1:2, thus the result is
said to be correct.
2. Route-1: 0 agents, Route-2: 100 agents
From iteration 0 to around iteration 5, the number of agents which choose
the Route-2 decreased and the number of agents which choose the Route-
1 increased. From around iteration 10, the number of agents for each
route oscillated. The average number of agents which choose Route-1 from
iteration 19 to iteration 99 was 35; the average number of agents which
choose Route-2 was 65. The ratio of 35:65 is about 1:2, thus the result is
said to be correct.
0 20 40 60 80Iteration
Number
of Agents
0
20
40
60
80
100
0 20 40 60 80Iteration0
20
40
60
80
100
Route 2
Route 1
Route 2
Route 1
2. Route-1: 0 agents, Route-2: 100 agents (Initial Plans)
1. Route-1: 100 agents, Route-2: 0 agent (Initial Plans)
Figure 13: The number of agents for each route (With driving behavior model)
33
0
25
0
25
0
25
0
25
0 20 40 60 80Iteration
Number of Agents
Route 2
Route 1
Slow Aggressive
Slow Cautious
Fast Aggressive
Fast Cautious
Figure 14: The number of agents for each iteration by agent types (Route-1:
100 agents, Route-2: 0 agents)
0
25
0
25
0
25
0
25
0 20 40 60 80Iteration
Number of Agents
Route 2
Route 1
Slow Aggressive
Slow Cautious
Fast Aggressive
Fast Cautious
Figure 15: The number of agents for each iteration by agent types (Route-1: 0
agents, Route-2: 100 agents)
Figure 14 and figure 15 shows the number of agents for each iteration by
agent types. Figure 14 shows the results of configuration “Route-1: 100 agents,
Route-2: 0agents”. Figure 15 shows the results of configuration “Route-1: 0
agents, Route-2: 100 agents”. The number of agents for each route by agent
types became stable around iteration 35.
1. Route-1: 100 agents, Route-2: 0 agents
34
From iteration 0 to around iteration 10, the number of agents which choose
the Route-1 decreased and the number of agents which choose the route-
2 increased. From around iteration 10, the number of slow agents which
choose Route-1 stopped decreasing while the number of fast agents which
choose Route-1 kept decreasing. By iteration 35 almost all the fast agents
moved from Route-1 to Route-2. The average number of agents for each
route from iteration 34 to 99 is shown in table 5.
Choosing Route-2, Fast agents can overtake slow agents and the travel time
of Route-2 is shorter than Route-1. Thus fast agents chose Route-2. Slow
agents began to avoid Route-2 after iteration 10 when more and more fast
agents began to choose Route-2. The result is said to be correct.
2. Route-1: 0 agents, Route-2: 100 agents
From iteration 0 to around iteration 5, the number of agents which choose
the Route-1 increased and the number of agents which choose the route-2
decreased. From around iteration 10, the number of slow agents which
choose Route-1 kept increasing while the number of fast agents which
choose Route-1 began decreasing. By iteration 20 almost all the fast agents
moved away from Route-1. The average number of agents for each route-
from iteration 34 to 99 is shown in table 6.
Choosing Route-2, Fast agents can overtake slow agents and the travel time
of Route-2 is shorter than Route-1. Thus fast agents chose Route-2. Slow
agents began to avoid Route-2 after iteration 10 when more and more fast
agents began to choose Route-2. The result is said to be correct.
It is not clear if the lane change probability cause the route selection of each
agent. In table 5 and table 6, Fast aggressive agents tends to choose Route-2
more often than fast cautious agents.
Let us see more details of the result of the configuration “Route-1: 0 agents,
Route-2: 100 agents”. Figure 16 includes graphs of the average speed of agents
at iteration 69 and iteration 99 by agent types.
1. Iteration 69
Slow agents run at about 20 [km/h] in both routes. Slow agents running
in Rouute-1 is slightly faster than agents running in Route-2. Whichever
35
Table 5: The average number of agents for each route by types of agents (Route-
1: 100 agents, Route-2: 0 agents)
Type of Agent Route-1 Route-2
Slow Cautious 14.5 10.5
Slow Aggressive 16.9 8.1
Fast Cautious 2.0 23.0
Fast Aggressive 1.6 23.4
Table 6: The average number of agents for each route by types of agents (Route-
1: 0 agents, Route-2: 100 agents)
Type of Agent Route-1 Route-2
Slow Cautious 16.2 8.8
Slow Aggressive 15.7 9.3
Fast Cautious 2.6 22.4
Fast Aggressive 0.3 24.7
route a slow agent take, it takes as much time as another route. So the
number of agents for each route is never imbalanced.
Fast agents run at about 27 [km/h] in Route-2, 20 [km/h] in Route-1 since
there are slow agents blocking them. So the number of fast agents of Route-
1 is less than Route-2 since it takes more time than Route-1.
2. Iteration 99
Slow agents run at about 20 [km/h] in both routes. Slow agents running
in Rouute-1 is slightly faster than agents running in Route-2. Whichever
route a slow agent take, it takes as much time as another route. So the
number of agents for each route is never imbalanced.
Fast agents run at about 27 [km/h] in Route-2, 20 [km/h] in Route-1 if
there are slow agents blocking them. There is only one fast agent which
runs in Route-1 and there are no slow agents in front. So the speed of fast
aggressive agent in Route-1 is 56 [km/h] which is nearly the desired speed
60 [km/h].
36
0
30
60Route-1
SlowCautious
Iteration 69
Iteration 99
SlowAggressive
FastCautious
FastAggressive
Route-2D
riv
ing
Sp
eed
[m
/s]
0
30
60Route-1
SlowCautious
SlowAggressive
FastCautious
FastAggressive
Route-2
Dri
vin
g S
pee
d [
m/s
]
Figure 16: The average spped of agents at iteration 69 and iteration 99 by agent
types
Table 7 shows the average number of agents by types which chose the dif-
ferent route than in the previous iteration from the iteration 34 to the iteration
99. Slow agents tend to change their routes more often than fast agents.
Table 7: The average number of route changers by types
Type of Agent Route Changer
Slow Cautious 4.5
Slow Aggressive 3.2
Fast Cautious 1.2
Fast Aggressive 1.3
Summary
Simulations of two routes selection with/without driving behavior model are
examined. The ratio of the agents for each route is the same in both simulations.
37
It was confirmed that the platform can conduct a simulation based on driving
behavior model which is also correct from the macroscopic point of view.
4.4 Simulation of traffic in a real road network
By simulations in the simple two routes road network, it was confirmed that
the platform can conduct a simulation based on driving behavior model which
is not contradicting the results of a simulation without driving behavior model.
The simulation aiming at testing the scalability of the platoform is shown
in this section. The simulation uses the actual road network of Kyoto City.
The amount of calculation depends on the number of agents, the size of the
simulation area, and the simulation time.
Configuration
The road network of Kyoto City was used for this simulation. Since the data
of the road network is commercially produced, every road link is included and
attributes like the number of lanes and one-way flag are accurate. Road links
which are closed for vehicles in normal time are removed from the road network.
As seen above, the road network is real, but ODs of agents are not real. The
number of iterations is 50 from the iteration 0 to the iteration 49.
Figure 17 shows ODs of agents running though the central part of Kyoto
City. There are also names of major places and streets on the map. The
simulation area is from Oike Street to Gojo Street (north to south) and from
Kawaramachi Street to Karasuma Street (east to west). The area is a historical
center of the city which includes amusement centers, business districts and
tourist sites with heavy road traffic. Kyoto City is promoting “Strategy for
pedestrians friendly streets”1) which encourages people to walk and take public
transportation instead of auto mobiles.
The number of OD types is 42. ODs are the combinations of two different
intersections from red circles on the map. Some ODs are named for analysis
later in this section using the intersection number shown in figure 17:
• OD-1: from intersection 1 to intersection 2
1) http://www.city.kyoto.jp/tokei/trafficpolicy/machinaka/
38
Oike St.Oike St.
Ka
rasu
ma
St.
Ka
wa
ram
ac
hi
St.
Shijo St.Shijo St.
Gojo St.Gojo St.
Street
Origin/Destination
Simulated Area
1
3
6 7
4 5
2
Kyoto StationKyoto Station
Yasaka ShrineYasaka Shrine
Heian Jingu ShrineHeian Jingu Shrine
Kiyomizu TempleKiyomizu Temple
Figure 17: ODs of agents running though the central part of Kyoto City
• OD-2: from intersection 1 to intersection 6
• OD-3: from intersection 1 to intersection 7
• OD-4: from intersection 7 to intersection 6
• OD-5: from intersection 7 to intersection 2
• OD-6: from intersection 7 to intersection 1
The desired speed is 30 [km/h] or 60 [km/h] and the lane change probability
is 0.05 or 0.4. There are four types of agents as the combinations of the desired
speed and the lane change probability. The number of agents for each OD is 40
and the number of agents is 1,680. To avoid the same type of agents clinging
39
together, four types of agents leave the start point one after the other. The
duration of the simulation is one hour.
Table 8: Types of Agents
Type of Agent Desired Speed[km/h] Lane Change Probability
Slow Cautious 30 0.05
Slow Aggressive 30 0.4
Fast Cautious 60 0.05
Fast Aggressive 60 0.4
Review of the results
Figure 18 shows the screenshot of the simulation snapshots reproduced by the
viewer software. Agents found more than one way for each OD. At iteration
49, the average number of routes executed for each OD by agents is 12.9. The
viewer can zoom in the parts of simulation area, and users can see the details
of driving behavior of each agent.
The simulation was conducted on a PC with 32-bit Windows Vista Oper-
ating System on Intel Core2 2.40GHz Processor and 1016.125MB memory was
allocated. The average of actual time required for the simulation was about
6 minutes. The entire time of simulation from iteration 0 to iteration 49 was
about 5 hours. The amount of calculation depends on the number of agents,
the size of the simulation area, and the simulation time. So the actual time
required for the simulation depends on these factors.
Figure 19 shows the average travel distance by agent types for each OD.
The average travel distance is not quite different among different agent types
compared to the average speed. The route to avoid congestion is longer than
the original route. The ratio of four types of agents is not imbalanced. Thus
the average travel distance are the same among different types of agents.
Figure 20 shows the average travel time by agent types for each OD. The
average travel time is a little bit different among different agent types. The
travel times of slow agents are a little bit shorter than that of fast agents having
40
Figure 18: Screenshot of the simulation snapshots reproduced by the viewer
software
0
3000
Tra
vel
Dis
tan
ce[m
]
OD-1 OD-2 OD-3 OD-4 OD-5 OD-6
Slow, Cautious
Slow, Aggressive
Fast, Cautious
Fast, Aggressive
Figure 19: Comparison of Travel Distance
the same OD.
Figure 21 shows the average driving speed by types of agents for each OD.
The average driving speed is the distance from the start to the goal divided by
the travel time. The travel speeds of fast agents are a little bit faster than that
of slow agents having the same OD.
The desired speed is 30 [km/h] or 60 [km/h], but the actual driving speed is
slower than the desired speed. The difference of driving speed between fast and
slow agents is the biggest in OD-1. Fast cautious agents drive at 21.6 [km/h]
41
0
800T
rav
el T
ime
[s]
OD-1 OD-2 OD-3 OD-4 OD-5 OD-6
Slow, Cautious
Slow, Aggressive
Fast, Cautious
Fast, Aggressive
Figure 20: Comparison of Travel Time
0
10
Dri
vin
g S
pee
d [
m/s
]
OD-1 OD-2 OD-3 OD-4 OD-5 OD-6
Slow, Cautious
Slow, Aggressive
Fast, Cautious
Fast, Aggressive
Figure 21: Comparison of Driving Speed
slow aggressive agents drive at 15.5 [km/h]. The difference of driving speed
between fast and slow agents is the smallest in OD-4. Fast aggressive agents
drive at 5.0 [km/h] and slow aggressive agent drives at 4.3 [km/h].
The driving speed of an agent does not depend on the desired speed or
the lane change probability of the agent but depends on its OD. The average
driving speed of agents having OD-1 is 18.4 [km/h], and the speed of agents
having OD-4 is 4.7 [km/h]. The speed of OD-1 is as fast as the speed of agents in
the simulation of two routes selection based on driving behavior model, which
implies that agents experienced no traffic congestion. However the speed of
OD-4 is as slow as pedestrians, which implies there were too many cars in the
routes and agents experienced heavy traffic jams.
Table 9: Four routes for OD-6
length[m] Slow Cautious Slow Aggressive Fast Cautious Fast Aggressive
2341 1 2 1 2
2346 1 0 2 0
2374 0 1 2 2
2378 1 3 1 2
42
The average driving speed of agents having ODs other than OD-1 and OD-4
is close enough to each other. 14 routes were executed at iteration 49 for OD-6.
Four in 14 routes were executed by more than one agent. Table 9 shows the
number of agents for each route. The average driving speed of agents for each
route was 18 [km/h], 18.4 [km/h], 19.1 [km/h], 14.8[km/h].
There were no clear difference among different types of agents. That is be-
cause there were no difference between any two routes. Fast agents want to
overtake slow agents to go faster, but there is no space for overtaking. Even if
there are two lanes on the road, agents cannot change lanes. So the lane change
probabilities do not have effects on the vehicle behaviors. Such traffic conges-
tions are caused by multiple ODs crossing each other which is also common in
the real urban traffic.
43
Chapter 5 Conclusion
There are two major approaches to a traffic simulation: a microscopic approach
and a macroscopic approach. “Driving behavior model” and “Large-scale traffic
simulation” are the key words of this study. Driving behavior model has been
studied in the area of traffic simulation based on micro model Large-scale traffic
simulation has been studied in the area of traffic simulation based on macro
model.
Models and purposes of existing simulators were introduced. The design of
a driver agent and the design of a road link required for introducing driving be-
havior model into large-scale multi-agent traffic simulation are proposed. The
process and input/output of the platform is also described. The platform is im-
plemented using MATSim-T. MATSim-T can run large-scale traffic simulation
efficiently. Simulations using the platform are shown. Those simulations aim
at the verification of the platform.
The contributions of this study are as follows.
1. Design of an agent architecture and a road link architecture to
integrate micro model into macro model
First contributions is to design an agent architecture and a road link ar-
chitecture. The agent consists of two layers: a layer of routing and driving
behavior. The routing layer determine the route on the abstract road net-
work and the driving behavior layer drives the vehicle based on driving
behavior model on a road link. Each road link has a two-dimensional sur-
face in which vehicles run through. The platform is implemented using
a toolkit named MATSim-T which can effectively run a large-scale agent-
based traffic simulation.
2. Verification of introducing driving behavior model and execution
time of simulation
The platform was applied to two examples for verification. First example
was simple enough to predict the results of the simulation and confirm
that the platform worked properly. Second example was complex enough
to show the capability of running a large-scale simulation based on driving
44
behavior models.
This study proposed how to integrate a driving behavior model into a large-
scale traffic simulation and implemented the platform to realize the proposed
design. In some cases, agents with different driving behavior models choose
different routes during the simulation. The platform is able to run a large-scale
simulation at the micro level.
45
Acknowledgments
I would like to express my gratitude to Professor Toru Ishida for his exact
directions and helpful discussions. Assistant Professor Hiromitsu Hattori and
Researcher Yuu Nakajima and PhD Student Shohei Yamane have always been
tolerant and supportive.
I appreciate the appropriate advice from Professor Hajime Kita at Kyoto
University and Associate Professor Satoshi Oyama at Hokkaido University. I
have learned a lot from Satoshi Yokota and Masahiro Okada at Advanced Sci-
entific Technology & Management Research Institute of Kyoto while developing
the simulation platform.
Finally, I would like to thank all members of Ishida and Matsubara Labora-
tory for creating a world-class environment for research and development.
46
References
[1] Ishida, T., Nakajima, Y., Murakami, Y. and Nakanishi, H.: Augmented
Experiment: Participatory Design with Multiagent Simulation, Interna-
tional Joint Conference on Artificial Intelligence (IJCAI-07), pp. 1341–
1346 (2007).
[2] Tanaka, Y., Nakajima, Y., Hattori, H. and Ishida, T.: A Driver Modeling
Methodology Using Hypothetical Reasoning for Multiagent Traffic Sim-
ulation, Pacific Rim International Workshop on Multi-Agents (PRIMA-
2007), Lecture Notes in Artificial Intelligence, Vol. 5044, pp. 278–287
(2007).
[3] Hattori, H., Nakajima, Y. and Ishida, T.: Agent Modeling with Individual
Human Behaviors, Proceedings of the 8th International Conference on Au-
tonomous Agents and Multiagent Systems (AAMAS-2009), pp. 1369–1370
(2009).
[4] Halle, S. and Chaib-draa, B.: A collaborative driving system based on
multiagent modelling and simulations, Transportation Research Part C:
Emerging Technologies , Vol. 13, No. 4, pp. 320–345 (2005).
[5] Kubota, H., Nakajima, K., Monji, T. and Sakamoto, K.: TISS-NET: Micro-
area Traffic Assignment Simulation System for Traffic Impact Study, Pro-
ceedings of the 4th International Conference on Computers in Urban Plan-
ning and Urban Management , Vol. 1, pp. 289–302 (1995).
[6] Yoshii, T. and Kuwahara, M.: SOUND: A traffic simulation model for
oversaturated traffic flow on urban expressways, Proceedings of 7th World
Conference on Transportation Research, Sydney, Australia (1995).
[7] Newell, G.: A simplified theory of kinematic waves in highway traffic, part
I: General theory, Transportation Research Part B: Methodological , Vol. 27,
No. 4, pp. 281 – 287 (1993).
[8] Balmer, M., Rieser, M., Meister, K., Charypar, D., Lefebvre, N. and Nagel,
K.: MATSim-T: Architecture and Simulation Times, Multi-Agent Systems
for Traffic and Transportation Engineering , IGI Global, chapter 3 (2009).
[9] Balmer, M., Cetin, N., Nagel, K. and Raney, B.: Towards Truly Agent-
47
Based Traffic and Mobility Simulations., 3rd International Joint Confer-
ence on Autonomous Agents and Multiagent Systems (AAMAS 2004), pp.
60–67 (2004).
[10] Bando, M., Hasebe, K., Nakayama, A., Shibata, A. and Sugiyama, Y.:
Dynamical model of traffic congestion and numerical simulation, Phys.
Rev. E , Vol. 51, No. 2, pp. 1035–1042 (1995).
48