Agent-Based Implementation of Particle Hopping Traffic Model With Stochastic and Queuing Elements
AAgent-Based Implementation of Particle Hopping TrafficModel With Stochastic and Queuing Elements
Camilla Champion, and Cody ChampionNovember 9, 2018
Abstract
Lagging or halted traffic is bothersome. As such, it is desirable to have a model thatcan begin to determine the efficiency of various traffic standardizations. Our modelintended to create a multifaceted realistic simulation of traffic flow while consideringseveral factors. These factors included: passing conventions, e.g., right except to pass(REP) rule, system perturbation caused by insertion of an accident into the system,accessible number of lanes available with the REP, various human factors such asvariation of individual maximum speed and likelihood to pass. A succession of modelswere created from a variation on an existing single-lane traffic model and adding extradimensionality to the lattice to include multiple lanes, passing conventions, stochasticelements for individuality, and queuing rules to movement algorithms. We found thatthe REP is an effective means of increasing the critical density that a system cansupport. Eliminating human factors and thereby automating the system, results ina 160% increase in the sustainable critical density of the system. The number oflanes increases the critical density of the system, but the maximum efficiency of thespeed distribution remains the same. Excluding system automation, the optimal speeddistribution for drivers maximal speed was found to be Beta(5,5). Accidents in stablesystems can cause small local jams without causing global jams.
Traffic jams are an inconvenience. The typical response has been to increase the capacityof the transportation infrastructure. The design of said infrastructure has typically reliedon outdated methods of prediction of traffic flow [1]. In recent years the space available fortransportation infrastructure expansion has decreased due to population growth, promptingan increased interest in the design and optimization of transport infrastructure [2]. Therefore,a robust and stable model of the dynamics of multiple lanes of traffic is desired. The modelherein is adapted from the 2014 Consortium for Mathematic’s Mathematical Contest inModeling problem; the Keep-Right-Except-To-Pass Rule [3].Several factors must be considered when formulating these models. Some of these factorsare the effects of passing rules, the impact of traffic perturbations caused by accidents, the1 a r X i v : . [ n li n . C G ] M a r ffects of speed limits, the flow capacity of multiple lane roads, and the impact of stochas-tic human factors or lack thereof, on traffic systems. An important part of this field ofdevelopment is understanding the effect of human behaviors on traffic dynamics. There are two predominant types of traffic flow models, macroscopic and microscopic.Macroscopic methods, such as fluid dynamics, attempt to analyze traffic flow by look-ing at conditions and variations within the system rather than individual agents [4]. Thecommon variables examined in these types of models are traffic flow, density, speed, andacceleration/deceleration. Fluid dynamics systems can provide a method to predict typicaltraffic flows rapidly and are therefore often used to predict traffic in real time. However,this is at the cost of predictive accuracy. Additionally, these approaches ignore the variationinduced by the individuals within traffic that can produce significant perturbations in thesystem as a whole. These models can also fail at predicting the dynamics of multilane trafficdisturbances caused by individuals [5, 6]. The primary issue that hinders the fluid dynamicmodels of multilane traffic is that the rules that govern individuals are largely ignored [7]and groups of cars are treated as an average of the characteristics of the members of thegroup also known as a platoon.The other model type typically used to predict traffic flows is the microscopic type,particularly cellular automata. The concept of this type of model can be traced as far backas 1948 when they were used to study biological systems [8]. Over time these models weredeveloped to describe a grid of cells that were in a binary state, either on or off [9]. Eventually,these models became very well known as the basis for Conway’s ”Game of Life” [10]. Thisdevelopment was extremely important as it led to Gosper’s demonstration that the ”Gameof Life,” and therefore cellular automata, is computationally universal in that it can mimicarbitrary algorithms, a key component in the turning test [11].These model utilized four main rules, each of these will be explored later.The environment of the model is always a lattice of cells that are spaced in some uniformpattern. These lattices can be 1, 2 or even 3-dimensional. It is typically assumed that thelattices exist in Euclidean space.Each cell in the lattice can hold any type of information such as a simple binary state ormore complex arrays of variables.Cells can be clustered and can have greater connectivity in more complex lattices, forexample, a 1D lattice will have a cell adjacent to up to two neighbors, but in a 2D lattice, thecell can be adjacent to two neighbors in the 1D plane and an additional two in the seconddirection.Each cell may be able to change the state of neighboring cells. This allows for bothgeneration and transmission of information in and through the lattice. This informationgeneration is produced when a discrete time step is completed, and all calculations betweencells will be performed in parallel. 2igure 1: The fundamental diagram of flow and density in traffic systems
There are two main ways of assessing the efficiency of traffic: a qualitative view of congestionand a quantitative value of the maximum density that a system can experience before trafficjams are observed.
Time-space diagrams can illustrate the congestion phenomenon. When the movement of allvehicles is plotted by position and time, it is possible to qualitatively view traffic jams [12].There are two forms of jams, global and local. Global jams will affect all vehicles in thesystem. All vehicles will decrease in speed or even stop for a period. These types of jams aretypically observed in high-density systems typically seven times greater critical density [13].Local jams are seen in both high and low-density systems. These occur when one vehicleforces another behind them to slow down before passing. These jams are observable in thespace-time diagram as small areas where a small sub-population or platoon of the vehiclesare slowed or stopped. This can be seen in the Fig.1.3.
Definitions of Velocity (V). This is the number of grid points that a vehicle moves in a singlecalculation cycle.Definition of density (K). This value is defined as the number of vehicles that are on thegrid divided by the number of total grid points. The inverse of K is also known as spacingand is used to estimate the safety of the system [14]. If the system can maintain high flowat low spacing, then the system will have fewer accidents.Therefore, flow is defined as Q = F low = V K = V ehiclestime (1)Where V = V elocity = GridP ointstime (2)and K = Density = V ehiclesGridArea (3)3igure 2: An illustration of a Space-Time Diagram that shows visual representation of trafficjamsThe relationship between flow and density is typically inverse; as density increases the flowdecreases. With a graph of flow vs. density, critical density, or K crit can be determined [12].This is the point where the system is first saturated and denotes the maximum density thatwill not cause global jams. After this point, global jams will occur. A more stable systemcan accommodate a larger number of cars and higher density. Therefore, a larger critical Kvalue implies a more stable system (See Fig. 1.3.1). Because a goal of our model was to be able to determine the effects of having an automatedsystem as opposed to each vehicle having unique characteristics, we chose to develop amicroscopic model using elements of cellular automata and more generally, an agent-basedmodel. In our models, each agent, or vehicle, has a set of unique characteristics. In the mostsimple, the single lane model, this is only its starting position. However, the full model hasa set of 9 total characteristics. These are outlined as follows for each vehicle:1. Starting Position: is the position of the vehicle at the start of the time interval2. Ending Position: is the position of the vehicle at the end of the time interval4igure 3: Each vehicle in the lattice can be no closer than 1 gridpoint in either dimensionand must be a discrete number of gridpoints away3. Current Velocity: is the velocity, and thus the distance that the vehicle determinesthat it should move4. Current Lane: is the lane that the vehicle occupies at the start of the time interval5. End Lane: is the lane that the vehicle occupies at the end of the time interval6. Car Type: Value of 1, or 2 to represent car or truck respectively. This is determinedrandomly with a researched proportion that is expected to be cars (0.95) [15]7. Rank of Vehicle: This is only used for the Variable Lanes model and denotes where inthe queue of vehicles the vehicle is located8. Rudeness Factor: A value from [0,1] denoting the degree of drivers rudeness9. Personalized max speed:These models also use a lattice, or grid, to help track the position of each vehicle similarto the lattices described in the description of microscopic traffic models above. The latticefor these models is defined as follows:1. Has an environment that is composed of a designated number of lanes and gridpointsfor a 2-dimensional grid that is the size of the number of lanes by the number ofgrid points. Vehicles are not allowed to be closer than one gridpoint as shown in thetwo-lane and eight gridpoints system Fig. 1 and will always be a discrete number ofgridpoints away.2. Each gridpoint holds the vehicle type that is there. In models where there are no trucks,i.e., the single lane system this information is binary. When accidents are introduced,the accident location is also listed as a value in the grid, and no vehicles are allowedto get within one gridpoint of the accident. Trucks occupy two adjacent gridpoints inthe same lane and are marked as a two in the front position.5. This Lattice has a neighborhood that is two dimensional. Thus, depending on thenumber of lanes, a vehicle can have up to 4 immediate neighbors4. Each vehicle uses the grid to determine their closest neighbors and where they canmove.We steadily built up our models from a single lane system with no differences betweenagents to a variable lane system able to include or exclude stochastic elements of humanbehavior in order to simulate human or automated traffic, introduce a halt in traffic that ispositioned at the scene of an accident from an accident and determine the effects, determinethe K crit values of different velocity distributions for varying initial densities, queuing impactsand determine the efficiency of the keep-right-except-to-pass rule. All of the created models were designed with the following assumptions:1. Velocities of all vehicles in the system are discretely positive throughout the models(i.e. speed).2. Vehicles will respond to stimuli from forward and backward directions3. Lane changes are instantaneous4. After initial vehicle assignment, no vehicles will enter or re-enter the system5. A vehicle’s response to stimuli can be quantified [12]6. All vehicles will maintain a set distance between others at the expense of speed7. All vehicles will accelerate and decelerate at a constant rate8. As vehicle spacing decreases, the chance of accidents will increase9. A Vehicle’s behavior is consistent and the following variables throughout:1. numlanes : The number of lanes allowed for the simulation, a constant in each simu-lation. This is also the number of rows in the lattice.2. density : Value between 0 and 1, this value is variable when building fundamentaldiagrams and a constant when building space-time plots.3. gridpts : Number of columns in the lattice4. numcars = round(density*gridpts*numlanes): The number of vehicles allowed for thesimulation. When density varies, this also varies.6. vmax
The maximum velocity that each car is allowed to move. This is varied betweensimulations sometimes using scaled beta distributions with α + β = 10 and sometimesconstant for every vehicle.6. badDriverp : Constant probability throughout each simulation of a driver randomlyslowing down7. passf actor : The probability that a driver will choose to pass when they are allowedto do soThough this was not fully built in every model this was the agent matrix: • The Single Lane Model: This model was created to resemble rule 184 [16]. As such themodel only had one lane of traffic. Cars, which were all one size, taking up one gridpoint, looked forward to determine where the closest car in front of them was. • The Two-Lane Models: The goal of these models was to emulate a two-lane highway inwhich the passing convention could be changed. Therefore, two distinct models werecreated, one was asymmetrical in which cars must only pass on the left and never theright. The other which is referred to as symmetrical allows for cars to pass in eitherlane without regard to different sides of the road.
The critical densities were calculated in systems where human factors were present, and speedof individuals was assigned via beta distribution. Both the asymmetric and symmetric two-lane models were used. The critical densities of uniform maximum speed were calculated(asymmetric 0.12, and the symmetric was 0.08).A representative plot that was used to find this information is shown in Fig. 5 and 6
The effects of the changes in the systems were also examined by space-time plots. Accidentswere also introduced into the systems as a perturbation. As seen in Fig. 7 the accident didperturb the system but once the accident cleared the system returned to normal flow.Both symmetric and asymmetric models were examined, and the occurrence of globaljams was noted. Shown in Fig. 8 a low critical density system was shown, the symmetricalmodel at its maximum critical density. Note the occurrence of multiple global jams. In Fig.9 a high capacity system is shown, the reason that this system is capable of high-densityflow is that jams are local and not global. An accident caused global jams in the symmetricsystem and only local jams in the asymmetric.7igure 4: The Critical Densities of systems that had agents maximum speed beta distributed8igure 5: Critical density of passing systems by maximum, as determined by beta distribu-tion. 9igure 6: Average velocity and initial density of an asymmetric system with a speed distri-bution of Beta(7,3) 10igure 7: Space Time plot of a Asymmetric system that had a Beta(5,5) speed distributionand an accident. The accident can be seen as a local jam.11igure 8: Space Time diagram of symmetrical system at critical density with a uniformspeed distribution, this is representative of low capacity systems12igure 9: Space Time diagram of an asymmetric system at twice critical density with speeddistribution of Beta(5,5). This is representative of a high capacity system.13igure 10: The density and speed distribution plot of a 4 lane system
The effects of systems with more than two lanes with queuing effects were also investigated.These results are shown in Fig. 10.The critical density is the same in the optimal system when four lanes are used insteadof 2, but the baseline Critical density has increased when queuing effects are considered.
The REP is an effective means of increasing the critical density that a system can support.If human factors are eliminated, i.e. the system is automated, the critical density that thesystem can support will also be increased by a factor of approximately 160 percent. Thenumber of lanes in a highway will increase the critical density of the system, but the relation-ship between the critical density and speed distribution of drivers will remain proportional.Without automation, the optimal speed distribution for divers maximum speed is Beta(5,5).Accidents in stable systems can cause small local jams without causing global jams. All codeis available from the associated Github repository [17].14 .1 Safety
By examining the space-time plots, we can see if the system is producing a large amount ofstop and go traffic. The least change in speed in the system the fewer accidents occur [13].The systems that had high critical densities showed least stop and go traffic as expectedbecause local jams will cause larger global jams. Therefore the proposed optimal systemsare not only faster but safer as well.
Due to the microscopic nature of the model we were able to measure the speed at everycalculation cycle and then use these values to calculate the global speed of every vehiclethat is still on the grid. Other models lack this capability and must use alternative methodsof measuring speed. Our variables include stochasticity which mimics real-world variationsto a higher degree than fluid dynamics models. Additionally, the addition of queuing, aswould be representative of movement in actual traffic distinguishes our model from a cellularautomata model and provides more relevant k crit values. The improvements on this model could be made are increasing the number of variables thatare assigned to each agent. Some possible variables are: weather (would affect all vehicleson the road by lowering the maximum speed and also by changing the reaction times ofdrivers), mental load (consider the human factor of distraction, for example, a driver wouldhave a slower reaction time if they are surrounded by other vehicles since their attentionwill be divided), other types of vehicles (motorcycles and extra wide load trucks would allhave different rules associated with them, motorcycles could ignore gaps and weave throughtraffic, or extra wide load trucks would take up two lanes).
Acknowledgment
Cody Champion was supported by the National Science Foundation Graduate ResearchFellowship Program under Grant No. 1144468. The content is solely the responsibility ofthe authors and does not necessarily represent the official views of the National ScienceFoundation.
References [1] T. L. Magnanti and R. T. Wong, “Network design and transportation planning: Modelsand algorithms,”
Transportation Science
Proceedings of the Royal Society of London, Series A , 1955.[5] “Analysis and validation of lane-drop effects on multi-lane freeways : P.k. munjal,yuan-shih hsu and r.l. lawrence: Transpn res. 5, 257266.”
Transportation Research
Transportation Research
Mathematics and Computers in Simulation
Cerebral Mechanismsin Behavior .[9] S. Wolfram, “Statistical mechanics of cellular automata,”
Reviews of Modern Phy , .[10] M. Gardner, “Mathematical games the fantastic combinations of john conways newsolitaire game ”life”,”
Scientic American , 1970.[11]
Life is universal!
Academic Press, 1982, ch. 25.[12] G. Sauermann and H. J. Herrmann, “A 1d traffic model with threshold parameters,”
Traffic and Granular Flow , 1997.[13] M. A. J. . G. G. Kloeden, C. N., “Reanalysis of travelling speed and the rate of crashinvolvement in adelaide south australia,”
Australian Transport Safety Bureau ATSB ,2002.[14] D. Ding, “Modeling and simulation of highway traffic using cellular automaton ap-proach,” Uppsala Universitet, Tech. Rep., 2011.[15] “Rita bts table 1-11,” US Bureau of Transportation Statistics, Tech. Rep., 2011.[16] N. B. Henryk Fuks, “Generalized deterministic traffic rules,”