Modelling Traffic on Road Junctions on Parallel Computing Systems Using Cellular Automata Approach

The paper deals with traffic flow modelling and simulation on supercomputer systems. The created mathematical model is based on cellular automata (CA) approach and allows to depict multilane traffic on various complex road configurations. The numerical algorithms for the model are designed for supercomputer calculations. The main focus of this research is the validation of the created models and the comparison with results obtained by other researchers, as well as with experimental data. Several test problems were solved to carry out the comparison. The results obtained show that the model represents traffic flow characteristics efficiently and correctly and can be used for real-life traffic predictions. Keywords—Traffic flow modelling, cellular automata, parallel computing.


Introduction
The cellular automata approach is a well-known method of traffic flow modelling (see, for example, [1]), being computationally simple and, at the same time, allowing for taking into consideration various nuances of real-life city traffic. As it is based on logical rules and not on differential equations (like the majority of other traffic flow models), the CA approach is the best way to introduce complex driver behaviour into a model. Driver behaviour contributes a lot in the traffic jam formation and evolving, therefore it is of great importance to reproduce it correctly, as well as to be able to calibrate it according to local conditions. Previously, the CA approach seemed to be the most promising for a detailed description of local road situations at short distances, since the models are quite flexible due to the ability to implement any driver strategy without significant algorithmic costs. However, the capacity of modern ultra-high-performance computing equipment allows models of this type to be successfully used to simulate traffic on large road networks.

CA Traffic Flow Model and Its Numerical Implementation
The created model is based on the classic Nagel-Schreckenberg CA model [2], but, as opposed to it, is two-dimensional and allows to depict multilane traffic. The basics of the CA approach are as follows: • The model is fully discrete • The computational domain (the road) is divided into cells, a cell is 7.5 meters long and one lane wide and can contain one vehicle or be empty • The time step is 1 second • The speed of the vehicle is measured in the cells that a car can cover per time step; • Each car has a set of parameters (unique ID, maximum speed, current speed and final destination) • At each time step the state of the system changes according to Nagel-Schreckenberg model rules, as well as various algorithms depending on type of the road element, traffic lights, traffic signs, driver behaviour parameters, etc.
For details regarding algorithms included in the proposed model, see [3].
In order to simulate traffic on complex road networks, the algorithms for standard road elements were introduced (see Fig.1). Different colours of cars represent different destinations attributed to them. Fig. 1(a) and Fig. 1(c) represent signalized intersections (T-cross and X cross respectively). In Fig. 1(b) a U-turn on a road with a wide median is shown. In Fig. 1(d), where the road with an accident is presented, the black circle represents an unmoving car that experienced the accident. In Fig. 1(e) an on-ramp is shown.

Fig. 1. Basic road fragments
Having these elements, one can compose a city road network of multiple configurations. In order to run computations on large scale networks, the program package for high performance computer systems was created. The code is written in C/C++ and uses the MPI library. Separate sub-programmes simulate traffic on different types of road elements in parallel, with data exchange on the boundaries.
At each time step processors exchange information whether any vehicles are crossing the boundaries during this step. If the answer is positive, the data regarding those vehicles is packed and sent/received, and the cars appear on the next road fragment. In order to avoid the situation where the target cell is already occupied, the information about all vehicles that stopped near the beginning of the road fragment is collected. If there is a traffic jam on the road, the drivers from the previous (upstream) fragment that are nearing its end can "see" it and slow down or stop if necessary.

Comparison with Kerner-Konhauser (KK) Model and Experimental Data
The focus of the research presented in this article is to see how well the created CA model reproduces spatio-temporal structures on the experimental velocity diagram and to compare the results with other models. To do so, the test problem of traffic flow dynamics prediction on a highway near a bottleneck (an on-ramp) was considered. The road configuration for this test problem can be seen in Fig 1(e): an on-rampan entrance to a highway from a secondary road. Figure 2 (taken from [4]) represents spatiotemporal dynamics of the local speed in the vicinity of road bottlenecks obtained experimentally in different parts of the world. Ox is time in hours and minutes, Oy -distance in kilometres, colour corresponds to vehicles' speed. Red regions have low speed (traffic jam), yellow regions -higher speed (congested flow), white regionsmaximal speed (free flow).   Figure 4 shows the simulation result obtained using the created CA model. Ox axis is time in minutes, Oy axisdistance in kilometres, vehicular speed V is represented with colour, from red (V~10 km/h, traffic jam) to dark blue (V~100 km/h, free flow). The on-ramp entrance is situated at the point X=10 km.
Comparing results shown in Fig. 4 with experimental data in Fig. 2 it's easy to see the similarities: the simulation results present similar stripes on the velocity diagram, demonstrating the way the congestion forms and evolves with time. On both pictures the point on the road where the bottleneck is situated is clearly seen on the spatio-temporal diagram. Once formed near the bottleneck, the congestion spreads upstream, forming a traffic jam. Depending on the flow rate on the main road, traffic congestions can also expand downstream of the bottleneck.
Comparing the same results with the ones obtained with the KK model, which is a macroscopic class model, one can see that while the main features of spatio-temporal structures are similar, the results of the CA modelling are much closer to the experimental data.

Averaging Methods
Similar comparison between the results obtained with the CA model and the experimental data has been carried out by the authors earlier (see [6]). But, as it turns out, the averaging method chosen to represent the results of the simulation matters a lot.
For [6], the arithmetic mean speed (1) was used: For this work, the harmonic mean speed (2) was used: Here ∆N is the number of the vehicles on a given road interval, α is a number of a car.
The harmonic mean speed method for traffic flow research is considered to be less biased (see [5], chapter 3).
To compare both methods, the simulation of traffic flow dynamics near an on-ramp, similar to the one discussed in Section 2 of this article, was carried out. The computations were executed with three different flow rates on an on-ramp. The results of the computations averaged out using arithmetic mean speed are shown in Figure 5. The results averaged out using harmonic mean speed are shown in Figure 6. The legend for the diagrams is the same as for Fig. 4.  Comparing these two methods, it is notable how much the second set of the results is closer to the experimental data. Although the right tendencies can be noted from the arithmetically averaged out results as well, the spatio-temporal structures on the velocity diagrams appear clearer when using harmonic mean speed to average out the data.

Conclusion
The models presented in this work reproduce experimental spatio-temporal structures in traffic flows well. The results are in agreement with the ones obtained using the KK model.
The averaging methods can contribute a lot in the quality of data representation, and the harmonic mean speed is preferable for traffic dynamics simulation.
The created program package for high performance computing systems can be used for traffic modelling on city road networks, taking into consideration different driving strategies and evaluating the efficiency of measures taken in order to decrease traffic jams.