













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Some concept of Traffic Engineering and Management are Accident Studies, Its Implementation, Area Traffic Control, Automated Traffic Measurement, Car Following Models, Coordinated Traffic Signal. Main points of this lecture are: Discrete Simulation, Simulation Models, Traffic Flow, Flow Modelling, Microscopic Simulation, Computer Simulations, Automata Programming, Cellular Automata, N-Dimensional Array, Cellular Automata
Typology: Study notes
1 / 21
This page cannot be seen from the preview
Don't miss anything!














In the field of traffic flow modelling, microscopic simulation involves the detailed models that describe the behaviour of individual vehicles so it is always a time consuming and a complex process. So, approximately a decade ago new microscopic models have been developed and they are based on Cellular Automata programming. The main advantage was an efficient and fast performance when used in computer simulations, due to their rather low accuracy on a microscopic scale. These so-called traffic cellular automata (TCA) are dynamical systems that are discrete in nature, in the sense that time advances with discrete steps and space is coarse- grained (e.g., the road is discretised into cells of 7.5m wide, each cell being empty or containing a vehicle). A Cellular Automata is an n-dimensional array of simple cells where each cell may be in any one of k-states. At each tick of the clock a cell will change its state based on the states of the cells in a local neighborhood. Typically, the rule for updating the state does not change over time, and is applied to the whole grid simultaneously. Due to its simplicity the CA rules are used to solve the complex behaviour. Through the use of powerful computers, these models can encapsulate the complexity of the real world traffic behavior and produces clear physical patterns that are similar to those we see in everyday life. One more advantage of cellular automata models is their efficiency in showing the clear transition from the moving traffic to jamming traffic. CA models have the distinction of being able to capture micro-level dynamics and relate these to macro level traffic flow behavior.
There are four components, which play a major role in cellular automata.
Figure 20:1: Physical environment as different types of cells, (Source: [6])
Figure 20:2: Neighbourhoods of the present cell i
The physical environment
The term physical environment indicates the physical platform on which CA is computed. It normally consists of discrete lattice of cells with rectangular, hexagonal etc shown in Fig. 20:1. All these cells are equal in size. They can be finite or infinite in size and its dimensionality can be 1 (a linear string of cells called an elementary cellular automaton or ECA).
The cells states
Every cell can be in a particular state where typically an integer can determine the number of distinct states a cell can be in, eg (binary state). Generally, the cell is assigned with an integer value or a null value based upon its state. The states of cells collectively are called as “Global configuration”. This convention clearly indicates that states are local and refer to cells, while a configuration is global and refers to the whole lattice.
The cells’ neighbourhoods
The future state of a cell is mainly dependent on its state of its neighbourhood cell, so neighbour- hood cell determines the evolution of the cell. So generally, the lattices vary as one-dimensional and two-dimensional. In one dimensional lattice, the present cell and the two adjacent cells forms its neighbourhoods ( shown in Fig. 20:2), whereas in the context of two dimensional lattice there are four adjacent cells which acts as the neighbourhoods. Therefore, it is clear that as the dimensionality increases the no of adjacent cells also increases.
this update procedure, e.g., a random sequential update. It is assumed that a driver does not react to events between consecutive time steps. For single-lane traffic, we assume that vehicles act as anisotropic particles, i.e., they only respond to frontal stimuli. So typically, the car- following part of a rule set only considers the direct frontal neighbourhood of the vehicle to which the rules are applied. The radius of this neighbourhood should be taken large enough such that vehicles are able to drive collision-free. In most cases, this radius is equal to the maximum speed a vehicle can achieve, expressed in cells per time step. From a microscopic point of view, the process of a vehicle following its predecessor is typically expressed using a stimulus-response relation. This response is the speed or the acceleration of a vehicle in TCA models. A vehicle’s stimulus is mainly composed of its speed and the distance to its leader, with the response directly being a new (adjusted) speed of the vehicle.
CA model represents a discrete dynamic system, consisting of four ingredients namely, the physical environment denoted as (£), the set of possible states denoted as (Σ), the associated neighbourhood cells of ith^ cell represented as (Ni) and the set of the possible future update cells is denoted by the notation (δ). So the CA is the function of the four ingredients and is formulated mathematically as CA = (£, Σ, N, δ). The physical environment (£) is a discrete lattice with the neighbourhood of radius 1 in normal case where as it changes with the user based upon his usage of the different cells sizes. The set of possible states denoted as (Σ) takes the values as ( 0,1) where 1 indicates the presence of vehicle in the cell or 0 for the empty condition. So, for every time step t the ith^ cell of a lattice has a state i(t) which belongs to Σ. In normal case of one-dimensional, lattice the neighbourhood cells of i are Ni = i − 1 , i, i + 1, where (i − 1) is the left hand side cell and (i + 1) is the right hand side cell. The set of possible future update cells is represented as i − 1(t), i(t), i + 1(t) → i(t + 1), where left hand side are the present cell and the neighbourhood cells and the right hand side part is the state of the cell i at time t + 1. Converting between TCA and real world units seems straightforward, as we only need to suitably multiply with or divide by the temporal and spatial discretisation ∆T and ∆X, respectively. The conversions for the macroscopic traffic stream characteristics densities, flows, and space-mean speeds, as well as the microscopic vehicle speed, are as follows:
k = k′^ ∗ 1000 /∆X (20.1) q = q′^ ∗ 3600 /∆T (20.2) v = v′^ ∗ 3. 6 ∗ ∆X/∆T (20.3)
where k′, v′, q′^ are the values of density, speed, flow in the units of CA, and k, q, v are the real world values of density, flow and speed. The length of our cell is 7.5 m and if our stretch of road is 1000m (i.e., 1 km ) then the no of cells in CA turns out to be 1000/7.5 =133.333 cells. So, for a single cell model if the density turns out to be “one unit” (i.e., one vehicle per cell) then in the real world its density (Kj) is 11000/7.5 = 133vehicles/km as per the equation. 20.1. The speed increment of the vehicles is the ratio of distance and time. In our case the distance is the length of one cell and time interval is one unit (sec) so the speed in km/hr is 7.53600/1000 =27km/hr as per the equation. 20.3.
In this section, we shall discuss about the Wolfram rule 184, which is used to determine the new state of the cell. In a single lane highway, rule 184 is used as a simple model for traffic flow and it forms the basis for many cellular automaton models of traffic flow. In this model, vehicles move in a single direction, stopping and starting depending on the vehicles in front of them. The number of vehicles remains unchanged throughout the simulation. Because of this application, Rule 184 is sometimes called the “traffic rule”. Rule 184 in a simpler way can be understood as a system of particles moving both leftwards and rightwards through a one-dimensional medium. The rule set for Rule 184 is described as; At each step, if a cell with value 1 has a cell with value 0 immediately to its right, the 1 moves rightwards leaving a 0 behind. A 1 with another 1 to its right remains in place, while a 0 that does not have a 1 to its left stays a 0. This description is most apt for the application to traffic flow modeling. The truth table for rule 184 is shown in Table. 20:1. The operation of the rule is easily summarized as: “if the center cell is at state zero, shift the state of the left neighbor into the center cell, else shift the state of the right neighbor into the center cell” (equation. 20.4).
σt i +1=
σti− 1 : σti = 0 σti+1 : σti = 1 (20.4)
Operation of rule 184: The first three columns are the neighborhood and the rightmost column is the state of the center cell that results from applying the transition function on the neighborhood. The name for this rule, Rule 184, is the Wolfram code describing the state in the Fig. 20:3: the bottom row of the figure, 10111000, when viewed as a binary number, is equal to the decimal number 184. All 8 possible configurations for the local neighbourhood are sorted in descending order, expressing the local transition rule (i, t) as explained by Fig. 20:3.
cellular automaton (STCA).
20.3 The Stochastic Cellular Automata (STCA)
We shall now discuss stochastic TCA models (i.e., these are probabilistic CAs) that allow for the spontaneous emergence of phantom jams. All these models explicitly incorporate a stochastic term in their equations, in order to accomplish this kind of real-life behaviour. In 1992, Nagel and Schreckenberg proposed. A TCA model that was able to reproduce several characteristics of real-life traffic flows, e.g., the spontaneous emergence of traffic jams. Their model is called the NaSch TCA, but is more commonly known as the stochastic traffic cellular automaton (STCA). It explicitly includes a stochastic noise term in one of its rules, which we present in the same fashion as those of the previously discussed deterministic TCA models. The space is divided into cells (cell may contain vehicle or can be empty). The length of a cell is the minimum space headway available between vehicles in times of jam, and numerically it is reciprocal of jam density and is set to 7.5 m( Kj=133veh/km). The STCA then comprises the following three rules (note that in Nagel and Schreckenberg’s original formulation, they decoupled acceleration and braking, resulting in four rules). Here we shall discuss about the NaSch model based upon its rules. There are four rules, mainly rules for acceleration, rules of deceleration, rules for randomization and lastly the vehicle updation step.
Step 1: Rule for acceleration
if (vn < vmax), then vn −→ min(vn + 1, vmax) (20.5)
This step reflects the general tendency of the drivers to drive as fast as possible without crossing the maximum speed limit. If the present speed is smaller than the desired maximum speed, the vehicle is accelerated. The desired speed vmax can be assumed to be distributed by a statistical distribution function where the values of vmax are only allowed to be 1, 2,..., 5 cell/∆t.
Step 2: Rule for deceleration
if (dn ≤ vn), then vn −→ min(vn, dn − 1) (20.6)
This step ensures that the driver doesnt collide with any vehicle ahead of him so that deceler- ation is applied to those vehicles which may collide. If the present speed is larger than the gap in the front, set v = gap. This rule avoids rear end collisions between vehicles. Note that here
a very unrealistic braking rule allowing for arbitrarily large decelerations is involved. This rule forces minimum time headway of ∆t s.
Step 3: Rule for randomization
if (vn > 0), then vn −→ max(vn − 1 , 0) (20.7)
This step of randomization takes into account the different behavioral patterns of the individual drivers, especially, overreaction while slowing down and nondeterministic acceleration where overreaction while slowing down will be mostly responsible for the formation of traffic jams. This rule introduces a random element into the model. This randomness models the un- certainties of driver behavior, such as acceleration noise, inability to hold a fixed distance to the vehicle ahead. Fluctuations in maximal speed, and assign different acceleration values to different vehicles. If present velocity of a vehicle is greater than zero then the velocity of the vehicle reduces by a single unit with a probability Pbrake. This rule has no theoretical back- ground and is introduced quite heuristically.
Step 4: Vehicle updation xn −→ xn + vn (20.8)
After the above three steps the position of vehicles are updated according to their respective velocities. Even changing the precise order of the steps of the update rules stated above would change the properties of the model.
Assume a single lane stretch road divided into 8 cells and vehicles are present in the first, third, sixth, seventh cells with 2, 1, 1, 0 as their velocities respectively. Apply the rules of cellular automata.
velocity 2 1 1 0
Solution: Apply the CA rules (equation. 20.5 - 20.8) in a sequential way as per the require- ments of acceleration, deceleration, randomization and vehicle updation. The rules are applied step wise as shown below.
This step is generally a randomly applied rule for a particular number of vehicles in a set of total n vehicles. This number depends upon the probability ratio p that the user defines. But in our case as we are working with a limited number of vehicles so we cannot use the probability function so for the simplicity of the rule we shall apply this rule ( additional deceleration) to all the those vehicles which undergo deceleration stage. So in our case the first vehicle undergoes randomization stage and acquires a new velocity of 0.
Step 4: Vehicle updation: ( according to equation. 20.8)
xn −→ xn + vn
The velocity of the first vehicle after undergoing the three rules has been reduced from two to zero, so the position of the vehicle is not changed in the next time step.
The figure below gives the reader a clear overview if all the four stages at a glance.
R
20.4 Lane changing
The concept of lane changing came into picture with the disadvantage of the single lane model of unexplained realistic traffic conditions. The reason behind this disadvantage is that a realistic traffic is usually composed of vehicle types of different desired velocities. The presence of such vehicles will result in platooning effect. The generic two lane model is the combination of two parallel single lane models with periodic boundary conditions with some additional rules as stated in the below sections. The update step is split into two sub-steps. In first sub-step the exchange of vehicles in the two lanes, take place according to the new rule set. Vehicles are moved only sideways. They do not advance in one go. However, in reality this does not happen and this is step is also not seen. This step has a meaning when it is coordinated with the second step. In the second step, the independent single-lane updates on both lanes according to the single lane update rules.
Nagatani has formulated an oversimplified model for two-lane traffic. There are some assump- tions in this model, one of which is that the maximum allowable speed of each vehicle is identical. Therefore, the model turns out to be a homogeneous type model and hence cannot explain heterogeneous traffic consisting of different types of vehicles. Some of the notations, which will be used to indicate the gaps in the lanes, are
1 1
1 1 2 1
Solution: Initially the solution starts with the acceleration stage of the vehicles, where the vehicles are applied with the acceleration rule (equation. 20.5). In the acceleration stage, a single unit increase in every vehicle, which possesses a velocity less than the maximum velocity. So stage of the vehicles after the acceleration are shown in the Fig. ??.
2 2
2 2 3 2
Lane changing is required for L 1 (1), L 1 (2), L 2 (1) where “L 1 (1)” indicates number in the sub- script as its lane number and the superscript as it vehicle number in respective lanes.
Rule 1: ( ∆Xpp (n) < V (n) + 1 ) ( as per the rule 9) The first vehicle has a velocity two and the gap ahead of it in its current lane is 2 so ac- cording to the rule (velocity +1 > gap). Therefore, the vehicle satisfied the rule so that it can change the lane.
L 1 (1) = (2 < 2 + 1)......... satisfied Similarly checking for all the other vehicles. L 1 (2) = (1 < 2 + 1)......... satisfied L 2 (1) = (1 < 2 + 1)......... satisfied
The term gap is generally referred in two different ways, where it is explained as the dis- tance between bumper to bumper of the vehicles. The other way to state, the term gap is “the number of empty cells in front of a vehicle”. Here in the present discussion it is taken as the earlier one but anyways it depends on the reader of choosing it where a slight modification (i.e., addition of ± 1on the other side of the equations).
Rule 2 : (∆Xof (n) > V (n) + 1 ) (as per the rule 10) The velocity of the first vehicle is two and the gap in the target lane ahead of it is four so the rule ( gap ( target lane ) > velocity + one ) is satisfied for the first vehicle.
L 1 (1) = (4 > 2 + 1)......... satisfied Similarly checking for other vehicles also will obtain the following results.
L 1 (2) = (2 6 > 2 + 1)......... rejected L 2 (1) = (4 > 2 + 1)......... satisfied
Rule 3 : No collision of vehicles is observed as per the pattern given.
Rule 4 : (∆Xob (n) > Vmax ) (as per the rule 11) The maximum velocity of any vehicle is given as four and the gap behind the first vehicle in the target lane is five which is greater than the maximum velocity so the vehicle satisfied the rule and subjected to lane change.
Similarly for the other vehicle also apply the same check. L 2 (1) = (4 6 > 4)......... rejected
Therefore the first vehicle in the first lane satisfied all the four rules.
In real world traffic the vehicles dont have unique velocities but it was an assumption in the model. So the vehicles are further divided into two types of different Vmax, namely Vf max, Vsmax, corresponding to fast vehicles and a slow vehicles. Introduction of “symmetric two lane model” for inhomogeneous traffic.
20.5 Extensions
There are two types
Sequential update : This updating procedure considers each cell in the lattice one at a time. If all cells are considered consecutively, two updating directions are possible, left-to-right and right-to-left. There is also a third possibility, called random sequential update. Under this scheme and with N particles in the lattice, each time step is divided in N smaller sub steps. At each of these sub steps, a random cell (or vehicle) is chosen and the CA rules are applied to it.
v
α (^) (^1) δ γ 2 1 β
Figure 20:6: Total asymmetric exclusion process, (Source: [1])
Global density [vehicles/cell]
TASEP (vMax = 1)TASEP (vMax = 5)
CA−184 (vMax = 1) STCA (vMax = 1, p = 0.1)
Global space−mean speed [cells/time step]
0 0.2 0.4 0.6 0.8 1
1
0.
0.
0.
0.
0
Figure 20:7: Speed - density relation, (Source : [6])
exclusion process (TASEP). If we consider the TASEP as a TCA model, then all vehicles move with Vmax = 1 cell/time step to their direct right-neighbouring cell, on the condition that this cell is empty. The process is shown in the below Fig. 20:6.
The above Fig. 20:7 gives a differentiation between four types of models and interestingly it is observed that the TASEP with Vmax = 1 has a trend of the Greenshield model and following a linearity in the speed-density relation. The same trend is also observed in the below Fig. 20: flow density curve.
Global flow [vehicles/time step]
Global density [vehicles/cell]
CA−184 (vMax = 1)STCA (vMax =1, p = 0.1) TASEP (vMax =5)TASEP (vMax = 1)
(^00) 0.2 0.4 0.6 0.8 1
0.
0.
0.
0.
**0.
0.**
Figure 20:8: Flow density relation, (Source : [6])
20.6 Assignment problem
Question 1 Assume a single lane road stretch divided into 9 cells and vehicles are present in the first, fourth, seventh and eight cells with 3, 2, 2, 1 as their velocities respectively. Apply the rules of CA and update the position of the vehicles in the next second.
Solution: Apply the CA rules (equations. 20.5 - 20.8) in a sequential way as per the require- ments of acceleration, deceleration, randomization and vehicle updation. The rules are applied step wise as shown below.
Step 1: Acceleration stage (according to equation. 20.5)
if (vn < vmax), then vn −→ min(vn + 1, vmax)
Step 4: Vehicle updation: (according to equation. 20.8)
xn −→ xn + vn
The velocity of the first vehicle after undergoing the three rules has been reduced from two to zero, so the position of the vehicle is not changed in the next time step.
Question Assume a two-lane road divided into nine cells in each of its lane. In first lane vehicles are present in first (1), third (0), fourth (1), eight (1) cells and in second lane vehicles are present in fifth (1) and sixth (0) cells. The numbers in the brackets indicate the present velocities of the respective velocities. Apply the lane changing rules and determine which vehicles fulfilled the lane changing requirements.
Solution: Initially the solution starts with the acceleration stage of the vehicles, where the vehicles are applied with the acceleration rule (equation 5). In the acceleration stage, a single unit increase in every vehicle, which possesses a velocity less than the maximum velocity. The updated velocities are therefore: In first lane vehicles: first cell (2), third cell (1), fourth cell (2), eight cell (2) cells and in second lane vehicles: fifth cell (2) and sixth cell (1) cells. Lane changing is required for L 1 (1), L 1 (2), L 2 (1) where “L 1 (1)” indicates number in the subscript as its lane number and the number in bracket as it vehicle number in respective lanes.
Rule 1: ( ∆Xpf (n) < V (n) + 1 ) ( as per the rule 9)
The first vehicle has a velocity two and the gap ahead of it in its current lane is 2 so ac- cording to the rule (velocity +1 > gap). Therefore, the vehicle satisfied the rule so that it can change the lane.
L 1 (1) = (2 < 2 + 1)......... satisfied Similarly checking for all the other vehicles. L 1 (2) = (1 < 1 + 1)......... satisfied L 2 (1) = (1 < 2 + 1)......... satisfied
Rule 2 : (∆Xof (n) > V (n) + 1 ) (as per the rule 10) The velocity of the first vehicle is two and the gap in the target lane ahead of it is four so the rule (gap (target lane) > velocity + one) is satisfied for the first vehicle.
L 1 (1) = (4 > 2 + 1)......... satisfied Similarly checking for other vehicles also will obtain the following results. L 1 (2) = (2 6 > 2 + 1)......... rejected. L 2 (1) = (4 > 2 + 1)......... satisfied.
Rule 3 : No collision of vehicles is observed as per the pattern given ahead of the vehicle.
Rule 4 : (∆Xob (n) > V max ) (as per the rule 11) The maximum velocity of any vehicle is given as four and the gap behind the first vehicle in the target lane is five which is greater than the maximum velocity so the vehicle satisfied the rule and subjected to lane change.
Similarly for the other vehicle also apply the same check. L 2 (1) = (4 6 > 4)......... rejected
Therefore the first vehicle in the first lane satisfied all the four rules and is subjected to the lane change.