traffic simulation using cellular automata and continuous models

4
Computer Physics Communications 121–122 (1999) 395–398 www.elsevier.nl/locate/cpc Traffic simulation using cellular automata and continuous models Marian Bubak a,b,1 , Przemyslaw Czerwi´ nski a a Institute of Computer Science, AGH, Cracow, Poland b ACC CYFRONET-KRAKÓW, Cracow, Poland Abstract We present an adaptable environment for traffic simulation. Rules are divided into several independent layers and those belonging to the same layer are interchangeable, so that it is easy to build a traffic simulator that conforms to the user needs. We have also developed new motion- and lane-changing rules based on the assumption that the driver behavior depends on the road situation and that lane changing minimizes the risk of being jammed at intersections. 1999 Elsevier Science B.V. All rights reserved. 1. Introduction Simulations of road traffic have become very pop- ular in recent years [1]. Apart from being interesting from the scientific point of view as modeling the col- lective behavior of a large number of interacting vehi- cles, efficient control of traffic is also extremely impor- tant for road planning and transportation policies [2]. Models of traffic may be divided into two groups – discrete (based on cellular automata – CA), e.g., the Nagel–Schreckenberg model [3], which is the most frequently used, and continuous ones [4]. Some in- vestigations have resulted in many practical and com- mercial applications. Good examples of such research projects are PARAMICS [5] and TRANSIMS [6]. While our main goal is to build complete simula- tion environment designed especially for realistic sim- ulation of traffic behavior in city-like road networks, we aim at gaining a reasonable flexibility of such an environment, which should allow the use of different 1 E-mail: [email protected]. models together and thus to enable customization and adaptation. We also want to build in our own models or extensions to existing models [3], namely, the cross- road and lane changing models. Next, we have developed a simulation environment. Since rules are divided into several independent layers and those belonging to the same layer are interchange- able, it is easy to build a traffic simulator that conforms to the user needs. 2. Simulation environment Phenomena which might occur in a simulated road network have been divided into several independent groups. It is convenient to present them as hierarchy of layers which are put into the framework that describes their relations and information exchange. There are the following main layers: forward motion and lane changing, phenomena at junctions, car routes and their management. As long as the range of information defined by the framework is sufficient, the set of rules for each layer may be changed without the 0010-4655/99/$ – see front matter 1999 Elsevier Science B.V. All rights reserved. PII:S0010-4655(99)00363-X

Upload: marian-bubak

Post on 02-Jul-2016

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Traffic simulation using cellular automata and continuous models

Computer Physics Communications 121–122 (1999) 395–398www.elsevier.nl/locate/cpc

Traffic simulation using cellular automataand continuous models

Marian Bubaka,b,1, Przemysław Czerwinskiaa Institute of Computer Science, AGH, Cracow, Poland

b ACC CYFRONET-KRAKÓW, Cracow, Poland

Abstract

We present an adaptable environment for traffic simulation. Rules are divided into several independent layers and thosebelonging to the same layer are interchangeable, so that it is easy to build a traffic simulator that conforms to the user needs. Wehave also developed new motion- and lane-changing rules based on the assumption that the driver behavior depends on the roadsituation and that lane changing minimizes the risk of being jammed at intersections. 1999 Elsevier Science B.V. All rightsreserved.

1. Introduction

Simulations of road traffic have become very pop-ular in recent years [1]. Apart from being interestingfrom the scientific point of view as modeling the col-lective behavior of a large number of interacting vehi-cles, efficient control of traffic is also extremely impor-tant for road planning and transportation policies [2].

Models of traffic may be divided into two groups –discrete (based on cellular automata – CA), e.g., theNagel–Schreckenberg model [3], which is the mostfrequently used, and continuous ones [4]. Some in-vestigations have resulted in many practical and com-mercial applications. Good examples of such researchprojects are PARAMICS [5] and TRANSIMS [6].

While our main goal is to build complete simula-tion environment designed especially for realistic sim-ulation of traffic behavior in city-like road networks,we aim at gaining a reasonable flexibility of such anenvironment, which should allow the use of different

1 E-mail: [email protected].

models together and thus to enable customization andadaptation. We also want to build in our own modelsor extensions to existing models [3], namely, the cross-road and lane changing models.

Next, we have developed a simulation environment.Since rules are divided into several independent layersand those belonging to the same layer are interchange-able, it is easy to build a traffic simulator that conformsto the user needs.

2. Simulation environment

Phenomena which might occur in a simulated roadnetwork have been divided into several independentgroups. It is convenient to present them as hierarchy oflayers which are put into the framework that describestheir relations and information exchange. There arethe following main layers: forward motion and lanechanging, phenomena at junctions, car routes and theirmanagement. As long as the range of informationdefined by the framework is sufficient, the set ofrules for each layer may be changed without the

0010-4655/99/$ – see front matter 1999 Elsevier Science B.V. All rights reserved.PII: S0010-4655(99)00363-X

Page 2: Traffic simulation using cellular automata and continuous models

396 M. Bubak, P. Czerwi´nski / Computer Physics Communications 121–122 (1999) 395–398

Fig. 1. Modules and their intercommunication.

need to change the other ones. Therefore, continuousand cellular models may be used for forward motionmodeling without any influence on the rules in otherlayers.

The implementation of the system consists of mod-ules, which encapsulate the layers mentioned above.Since the forward motion and lane changing layersmake use of the same data structures they are mergedinto one module “Road”. Other modules provide over-all simulation control and perform collecting trafficstatistics. Fig. 1 presents the data exchange and rela-tions among modules.

3. Rules for lane changing

In our model two main strategies of lane changingare used:• a vehicle chooses the lane which allows traveling

with higher velocity (overtaking),• a vehicle chooses the lane according to the turn

direction at the junction.A car changes lane if all the following conditions

are met:(1) The situation in the current lane does not allow to

travel at the least acceptable speed,(2) The situation in the other lane makes possible to

travel at a desired speed,(3) there is enough space in the other lane and the

safety condition for all the cars which take partin the maneuver is not broken.

In the simplest case only the nearest neighbors ofthe cars under consideration are taken into account.Under this assumption, all these rules can be statedusing the expression for the safe distancedsafe(v1, v2).This formula denotes the minimal distance betweentwo following cars that have such velocitiesv1 andv2

so that an interaction between them does not occur.The formula fordsafe is strictly connected with rulesused for forward motion. Formally, the change laneconditions can be written as:

dfc < dsafe(vfc, vdc), (1)

dfo > dsafe(vfo, vdo), (2)

dbo> dsafe(vc, vbo), (3)

rand() < pchange, (4)

where dfc is the distance to the preceding car onthe current lane,vfc the velocity of this car,dfo thedistance to the preceding car on the other lane,vfo thevelocity of this car,dbo the distance from the car in theback on the other lane,vbo the velocity of this car,vdc

the minimal acceptable velocity to stay on the currentlane,vdo the desired velocity for the other lane,vc thevelocity of the current car.

By changing the relation betweenvc, vdo and vdc

one can obtain a rich variety of driver behavior. This isused to express the two different strategies mentionedabove.

A car which is far from the junction (in the overtak-ing zone), uses the overtaking symmetrical strategy.When it gets closer to the junction (the force zone),it tries to reach the appropriate lane using the secondstrategy. To estimate the location of the boundary be-tween those zones we assumed that a certain free spacelc (usually 100–200 m) is necessary for the maneuver.So if the target lane is empty, the car changes strategyat the distancelc from the junction. However, whenthere are other cars between the considered one andthe junction, this distance is enlarged by the space oc-cupied by these cars (including the distance traveleddue to the average driver reaction time). This condi-tion can be expressed formally by

d < lc+∑

(li + vi1t),

whered means the distance from the junction.

Page 3: Traffic simulation using cellular automata and continuous models

M. Bubak, P. Czerwi´nski / Computer Physics Communications 121–122 (1999) 395–398 397

4. Crossroads

A car in the interaction zone (at the terminating partof the road) is forced to slow down and stop unlessit gets a “pass” – the privilege to cross the junction.This “pass” determines also the outward lane. At anymoment only one inward lane can be bound to thegiven outward one to avoid collisions among the carscoming from different directions. The car which gotthe “pass” receives information about the first car onthe connected lane.

Once given the “pass” cannot be taken away be-cause it could break safety conditions. A car holds ituntil crossing the junction. The moment of crossing iswhen the distance between the car and the junction be-comes negative. Then the car moves onto the outwardlane assigned to it, the “pass” is released and may begiven to another car at the same step of the simulation.

The “pass” is given to the car with highest priorityamong these which go in the current direction andmeet the following conditions:(1) the traffic light is green (if there are traffic lights

at this junction),(2) all cars closer to the junction in the same queue

have their “passes”,(3) its trajectory does not cross with the trajectory of

any car being allowed to pass the junction.The first rule allows for the implementation of

traffic lights. Omitting the second one would make

Fig. 2. Flow through the rotary as the function of car intensity.

the rule-set prone to deadlocks. The third one preventscollision between cars at the junction.

5. Sample results

Figs. 2 and 3 display simulation results obtained forthe rotary of 600 m of circumference using our modelof realistic crossroad with traffic lights. The rotary ismade of four junctions and four road segments. It isshown that the deadlock occurred for intensities above0.75.

Figs. 4 and 5 depict profiles of distribution ofvehicles grouped against their planned turn directionalong the road segment between two crossroads. Theroad segment is three-lane and 2 km long, arrangedin such a way that cars going left should enter thecrossroad using the leftmost lane, going straight themiddle one and going right the right most one. Thedistribution of cars at the beginning of the road israndom. The minimal length of the force zone is setto 100 m.

One can see that not all vehicles finally reach thelane they are expected to. Cars on the target lane donot get information on which car tends to change intotheir lane so they cannot be “polite” and slow down tomake some space in front of them.

Fig. 3. Travel time for the rotary as the function of car intensity.

Page 4: Traffic simulation using cellular automata and continuous models

398 M. Bubak, P. Czerwi´nski / Computer Physics Communications 121–122 (1999) 395–398

Fig. 4. Amount of cars preparing to turn in the given direction onthe leftmost lane.

Fig. 5. Amount of cars preparing to turn in the given direction onthe middle lane.

6. Summary and future work

In this paper we presented the design and imple-mentation of the road traffic simulation environmentbased on the idea of dividing the rules into severalindependent interchangeable layers, which facilitatesbuilding a traffic simulator conforming user needs.The development included the new model of realisticcrossroad with traffic lights and the new lane changingmodel.

Now we are working on a road network editor,dedicated data processing tools, route generator andfurther improvements of our models.

Acknowledgments

We are grateful to Mr. Włodzimierz Funika forinteresting discussions. This research was supportedin part by AGH.

References

[1] A. Bachem, C. Gawron, C. Moll, M. Rickert, P. Wagner,Microscopic traffic simulations of road network using high-performance computers, in: Proc. HPCN’98, Brussels, Belgium,April 1996, p. 306.

[2] B. Chopard, A. Dupuis, P. Luthi, A cellular automata modelfor urban traffic and its application to the city of Geneva,in: Proc. Traffic and Granular Flow’97: http://cuiwww.unige.ch/∼chopard/Traffic/ca-models.html.

[3] M. Rickert, K. Nagel, M. Schreckenberg, A. Latour, Two lanetraffic simulations using cellular automata, Physica A (1996)231; (1996) 534; http://www.zpr.uni-koeln.de/∼mr/.

[4] S. Krauss, Towards a unified view of microscopic trafficflow theories, http://www.zpr.uni-koeln.de/Forschungsverbung-Verker-NRV/.

[5] The PARAMICS Project, http://www.epcc.ed.ac.uk/epcc-projects/PARAMICS/.

[6] The TRANSIMS WWW Home Page, http://studguppy.tsasa.lanl.gov/.