Copyright © IFAC Transportation Systems Chania, Greece, 1997
CATS: A COMPLEX ADAPTIVE TRAFFIC SIMULATOR'
F. Archetti1', E.Messina1', B.Mishra~,F.Stellal'
'( Dipartimento di Scienze dell 1njormazione, Universita degli Studi di lvIi/ano Via Comelico 39/41 , 20135 Milano, Italy NYU Courant Institute, N~' York, USA
*
Abstract: In this paper the authors investigate how the autonomous agents methodology can be used for mode ling and simulation of urban traffic systems. The proposed approach allows to directly include subjective measures for characterizing drivers' behavior throgh a specific information set, different goals and different strategies. A description of the basic agent models as: driver, traffic-light and toll is reported. An object oriented modeling and simulation environment has been implemented in lAVA in order to allow the system to run on different platforms. Moreover lAV A., through is multi thread structure is particular well suited to the representation of a multiagent population. Keywords: Agents, Drivers, Simulation, Traffic Control, Adaptation, Neural Networks
1. INTRODUCTION
of the system, it will simplify the analysis of the global properties of the system.
Autonomous agents have been gaining increasingly attention as a powerful tool for modeling the global dynamics of complex systems. In this paper the authors describe an agent based approach for modeling, simulating and analyzing urban traffic. The main difficulty is due to the complex interactions among the indi"idual driver' s decisions in response to the traffic conditions and depending on their travel plans. The aggregated result of indi"idual optimal travel plans is often in contrast \\'ith the travel plans that give the system optimUlll, i.e. the overall maximal throuput. The effect of control decisions on the overall system dynamics is, therefore, very difficult to predict. Since it is not easy to obtain a complete global knowledge about the state of the system, control strategies should be derived by defining and analyzing local strategies. This makes attractive to build a simulation model by defining local entities, with simple strategies and simple interaction rules. Even if this approach will not solve the conflict between local and global performance, which is routed in the very structure
Closed related methods from computational physics as cellular automata for modeling and simulation of traffic systems (Biham and Middelton, 1992; Nagatani, 1993; Nagel and Schreckenberg 1992; Schadschneider and Schreckenberg, 1993). Microsimulation systems based on these methods have been considered in Nagel and Rasmussen (1994), within the TRANSIM project by Cameron and Duncan (1996) in their system PARAMICS and Yang and Koutsopoulos (1996) in MITSIM. The main features of such computational approaches is the direct simulation of the traffic system using local rules, allowing the global properties to emerge as a result of interactions without any ex-plicit assumption on the aggregated model. CATS is relatively close to MITSIM in its general design. Both systems represent networks in detail, simulate vehicles individually allowing car following, lane changing and reacting to traffic signals. Driver choices are captured by probabilistic
"This project has been partially supported by CNR within the PFr2 (Progetto Finalizzato Trasporti 2)
1271
route choice models which are triggered by traffic conditions.
environment state through simple internal interfaces and to take autonomous decisions on a basis of available knowledge and simple decision rules. The four basic properties i) to iv) are used to characterize the autonomous agents acting in our system: the "driver", the "traffic-light" and the "toll-pricing" agents. Agents must therefore be endowed with behavior rules, learning and adaptation mechanisms and goal attainment policies. In particular, they maintain both static and dynamic information and are provided with several methods which ensure properties i) to iv).
The software design of CATS is substantially different from MITSIM, relying on artificial agents design methodology implemented in lAV A These design choices ensure at the same time more modeling power and quicker implementation. According to this modelling technique agents represents entities acting in the system such as drivers, traffic-lights and toll-paying stations. Each agent is characterized by its own goal/s, information sets and methods which elaborate this information in order to reach the specified goal. Moreover, methods and rules depend on subjective (behavioral) parameters. The advantage of this agent-based technique is that etherogeneity among agents can be easily introduced and different population of agents can also be defined.
In the sequel we will describe the structure of the agents that populate the traffic network Links in the network consist of lane/so Each lane is discretized into a number of sites (Fig. 1).
I
The rest of the paper is organized as follows. Section 2 gives an overview about autonomous agents and a description of our "basic" agents: the driver, the traffic-light and the toll-pricing agent, while Section 3 is devoted to an outline of CATS.
I
UNI:
UJ«1
I /
Cll.0SSllSE
/
om:
2. AUTONOMOUS AGENTS
lA>Q';2
I
lL'lo:
In this Section basic definitions used in the sequel of the paper are given. The authors' aim is not to pro"ide a new and general definition of autonomous agent but instead to unify the existing ones in the light of the modeling domain which will be described in this paper.
I
I
Fig. I: Link, crosslink, lane and site 2.1 Basic Definitions 2.2 Agents ' Structure
Amongs all the definitions pro"ided in the wide literature about autonomous agent the following introduced by Wooldridge and Jennings (1995) seems appropriate for the aim of this paper:
2.2.1 Driver Agent
This agent is structured as follows: a) Static Information a.l) daily journey origin~estination, a.2) demand rate a.3) list of possible routes
Definition 1. Autonomous Agent An autonomous agent is each entity having the follo\\-ing properties: i) Autonomy: capability to operate without any external control; ii) Reacti"ity: ability to perceive and react to the surrounding environment; iii) Social Ability: capability to interact with other agents using their own interface; iv) Pro-activeness: goal-oriented behaviours.
b) DynamiC Information b.l) departure time,
b.2) actual time, b.3) actual speed b.4) actual position. c) Goal: the driver goal is to minimize the cost of
his travel both in terms of time and money (toll paid). His cost function is expressed as a linear combination of these two variables whose parameters depend on the driver preferences. When toll pricing agents are active, the cost c(i) associated to each link i is:
An autonomous agent is substantially any entity which is capable of enclosing all the above four
properties and can be either a software or hardware or biological system even if its functionalities are very simple. An autonomous agent needs to be able to compute simple functions, to manage trivial communication procedures, to perceive the
c(i) =
1272
/3 toll{i) + exp_time(i)
where toll(i) is the toll price of the toll associated with link i (if any), exp_time(i) is the expected travel time along link i and ~ is a parameter which characterizes the driver preferences.
In order to model driving decisions based on inputs describing the dri"ing emironment and its changes over time, neural networks have recently emerged as a preferred solution (Bielli et al., 1994: Dougherty, et aI. , 1994; Lyons, 1995). Therefore in CATS the e>.-pected travel time along the remaining links of the route is computed using a set of neural networks (one for each link of the possible paths) whose weights are dynamically updated. Such a mechanism allows to adapt drivers' choices depending on the state of the system.
d) Rules and Methods d 1) speed policy, let v(t) be the speed at time t and the gap be the number of u.noocupied sites in front of the vehicle. The speed is adjusted according to the following rule:
IF (v(t) < VIlla" ) AND ( gap> v(t) + 1) THEN v(t+l) =v(t)
+1
IF ( gap> v(t) - 1 ) THEN v(t+1) = gap
OripUIU
r - - -
tiltS
Furthermore, at each time stage t the driver reduces his speed by one "',ith prOOability p, where p is a parameter which depends on the behavioral attitude of the driver. d2) manoeuvre policy, when the driver is traveling along a multiple lane road he can decide, according to a given probability q, to change lane depending on his speed and on the road condition.
-u";k~E- - - ' - - - r
"'T -
-
-
r - ...
r - - -
T" \
I .L -
r -
.....L -
I Linty
--+-""'--1 \
__
The algorithm works as follows : if there is a vehicle with velocity v(t) on the current lane, then it looks, on the target lane, for the ne>."! car ahead (which may be his neighbor): this distance is denoted as gapJ Then, it looks for the ne>."! vehicle behind, on the target lane: this distance is denoted by gap_b. Then, the following rule is applied:
I
1_..L_~
____ ....L _ _ _
D~~~- T~TR ~~"~ UHl tinkW
Fig. 2: Dynamic neural network travel time forecasting
IF (gapj> v(t» AND (gap_b> Vmax) THEN change_lane with probability q; v(t) = max(Vrna.~ gap_f) on the new lane;
Finally drivers inter-departure time is randomly drawn from a distribution which is defined based on
ENDIF
traffic conditions. In the case of low congestion drivers are generated according to a Poisson process "With interval time:
When the driver arrives to a cross a similar rule can be applied. For example the rule applied to turn right on aT-junction is the following:
IF (gapj > v(t» AND (gap_b > Vmax) THEN where
change_lane with probability q; v(t) = max(Vrnax, gap_f) on the new lane: ELSE IF (v(t) >= I) THEN v(t) = 0;
t k + 1 represents the departure time for the
next driver, }~ is the demand rate and u is a random variable uniformly distributed in [0,1 J.
2.2.2 Traffic-Light Agent
ENDIF
The Traffic-Light is characterized by a pair of agents (agentl, agent2) associated "With the two crossing lanes, lane! and lane2 respectively. These agents have the follo"Wing structure:
d 3) routing policy: at the beginning of the simulation each driver computes his shortest path, in term only of distance. Since this path could be suboptimal in terms of costs, as defined above, he computes a set of alternative routes to which he can subsequently switch. The switching can take place, with a certain probability, at each node and is triggered by a forward looking mechanism which assesses whether the remaining links of the original shortest path are dominated by other routes. The switching probability depends on the delay incurred so far.
a) Static Information: a 1) location; a2) cycle time !It: b) D.llnamic Information: bl) current traffic densities PI and P2 of lanel and lane2, respectively: b2) split between green and red;
1273
c) Goal, the typical goal is to balance the queues
It is used as a control policy for inducing drivers to change their habits, in order to distribute the traffic flows among different routes.
occurring in the two lanes of intersection;
d) Rules and Methods: d I) let 1 I and 1 2 be two real parameters such that
3. THE CATS ENVIRONMENT
n
YI ~O , 12 ~O and +12 =1. Then 1 J tli and 12 tli represent the slots of time during which agentl is green and agentl is red and viceversa. The control rule aimed at maintaining the value ofPI as close as possible to the value ofP2 is the following:
3.1 Road Network Afodeling Module
This module allows to assemble a complex road network using basic units such as vertical link.. horizontailink, T-shape link and cross link, and by associating to each link the follOwing attributes: • • • •
IF (PI < P2) AND (12 < 1-&) THEN 12 = min (Y2 +cr,I-s); i'1=1-r2 ~
length, type: (single or double Jane, one or two way), maximum allowed speed, capacity.
This information is provided during the road network editing by using a simple and user-friendly graphical interlace.
ELSE IF (PI> P2) AND (n < 1-&) THEN 1 1= min(y I +cr,I-&):
Y2=1-n ; ENDIF
This module allows us to define the number and the location of traffic lights and toU-pricing stations in the road network. Once a given road network it is built it is possible to save it. Furthermore it is possible to load previously saved road networks.
where cr and & are fixed parameters. 2.2.3 Toll-Pricing Agent
This agent has the following structure:
3.2 Traffic Modeling Module
a) Static Information : al) location;
The system can be defined according either to a single-population model or to a multi-population model. In the first case drivers belong to a unique population with the same goals, information sets and methods to elaborate this information. but at the same time retain important sorts of heterogeneity with respect to the parameters which characterize the behavior of each single agent Instead, in the multi-population model drivers are split into different classes characterized by heterogeneity of goals, computational abilities and information sets. For a single population behavioral parameters can be defined by choosing default values related to the given driver population. To define multiple driver populations different classes of beha"ior parameters, goalls and methods must be chosen.
a2) starting toll price;
b) Dynamic Information:
b 1) current local density p; c) Goal, the aim of this agent is to keep the traffic density p close to the critical density p *, i.e. the density at which the system reaches maximum throughput; d) Rules and Methods:
dl) the pricing policy is aimed at maintaining the link traffic density P as close as possible to P *, i.e. (p*-a)
A major advantage of this multi-agent simulation is that it allows us to define easily different classes of drivers whose heterogeneity is given not only by the behavioral parameters but also by the rules that generates their behavioral characteristics. In particular, using this paradigm it becomes very easy to define different driver classes depending on their knowledge of the traffic area under consideration. "Knowledgeable" drivers are much more likely to switch to alternative routes while drivers who are not expert are more likely to stick on the original choice. Further classes of drivers can be defined imposing different toll-pricing policy. For example, the toll may be paid only by drivers who come from
IF (p < P *-0.) THEN toll = toll - 8 ELSE IF (p> p*+et) THEN toll = toll + 8 ENDIF where 8 is a fixed parameter. The toll price of a link changes dynamically and once it is computed it is made available to all drivers who have a chance to go through it.
1274
Traffic Engineering'" Control 36: 1, pp. 1015. Yang, Q. and H.N. Koutsopoulos (1996) "A Microscopic Simulator for Evaluation of Dynamic Traffic Management Systems", Transportation Research Part C- Emerging Technologies, 4:3, pp. 113-129. Nagatani, T. (1993). Self~ganization and Phase Transition in Traffic-Flow Model of a Two-Lane Roadway. J. Phys. A : Math. Gentile 26, pp. 781-787. Nagel, K. and S. Rasmussen (1994). Traffic at the Edge of Chaos. ArtifiCial Life V, pp. 222235. Nagel, K. and M. Schreckenberg (1992). A Cellular Automaton Model for Freeway Traffic. J. Phys. I France 2, pp. 2221-2229. Schadschneider, A and M. Schreckenberg (1993). Cellular Automaton Models and Traffic Flow. J. Phys. A : Math. Gentile 26, pp. 679-683.
outside, and different prices can be charged in order to retain some categories of drivers to enter some areas (an infinite price in order to forbid their access to the some areas). Traffic-lights and toll-pricing agents are also to be defined within this module by choosing all their characteristics which will be utilized during the simulation phase. 3.3 Traffic Simulation Module
The traffic simulation module is designed in order to allow us to specify all simulation information and to initialize the overall system for the subsequent simulation phase. More precisely this module initializes the overall system, performs the simulation of the traffic road network evolution, collects all useful information needed for the graphical and statistical analysis module and allows us to monitor the traffic system evolution through time. Furthermore, it allows us to interactively control the traffic road network and to monitor the evolution of the traffic system. 3.4 Graphical and Statistical Analysis Module
In this module several graphical and statistical tools are available to display and analyze the emerging global pattern and to peep on the local behavior of each single link. More precisely the following graphics are provided both for the network and for each link: flow vs density, travel time vs density, variations of travel time vs density and space vs time. This module allows us also to perform graphical analysis of system performance measures w.r.t. driver behavior parameters.
REFERENCES Bielli, M. G. Ambrosino and M. Boero (1994). Artificial Intelligence Applications to Traffic Engineering, (Bielli, M. G. Ambrosino and M. Boero Eds.), Utrecht, The Netherlands, VSP. Biham, O. and AA Middelton (1992). SelfOrganization and a Dynamical Transition in Traffic-Flow Models. Physial Review A, pp. 6124-6127. Cameroo, G.D.B. and G.I.B. Duncan (1996) "PARAMlCS: parallel microscopic simulation of road traffic", Journal of supercomputing 10:1, pp.25-53 . Dougherty, M.S., H.R Kirby and RD. Boyle (1994). Using Neural Networks to Recognize, Predict and Model Traffic. In: ArtifiCial Intelligence Applications to Traffic Engineering (Bielli, M. G. Ambrosino and M. Boero Eds.), Utrecht, The Netherlands, VSP. Lyons, G. (1995) "Calibration and Validation of a Neural-Network Driver Decision Model",
1275