Keywords

1 Introduction

Traffic optimization is complex, it has many important segments, like statistical data collection, real-time data collection, driver and vehicle behavior, and the optimization algorithm. In this paper, we only focus on the optimization algorithms and add a brief introduction about the other segments for better understanding. There is no doubt about the importance of data collection and traffic identification. Semet et al. collected traffic statistical data to calibrate a simulation model with a memetic algorithm and used a genetic algorithm to optimize the traffic flow [23]. A genetic algorithm achieved significantly better results than an expert. Collecting statistical data will improve traffic control and play an essential role in developing new road networks. There are many ways to use statistics to install a new road network [24]. The traffic is changing rapidly, and traffic control needs to be adapted to this dynamic system. The traffic is not fully observable, but good estimations can be created. The observation and estimation of the current state of traffic become the initial condition for short-term prediction. Monitoring can be performed using connected vehicles (CVs) and external sensors. Smart camera-based systems for intersection control provide an excellent decentralized capability and enable efficient management [25]. Complete observation of all intersections is not an efficient method and in the predicted future, it is not required for CVs. Another critical part of traffic management is communication. The 5G network offers significant optimization opportunities [20]. Ning et al. developed a hierarchical reinforcement learning-based model and caching model for managing the Internet of Vehicles. The system has been optimized based on the limitations of the 5G network and the processing capacity [17]. Sachenko et al. examined the system signal flow, including sensors, embedded devices, and a cloud server built with LabView and ThingSpeak [4]. One of the most popular topics is CVs and their integration into traditional non-connected cars. Coordinating CVs and conventional vehicles is a vital task. Karimi et al. examined highway merging options in different scenarios for connected and conventional vehicles [11]. A detailed traffic simulation uses different models for people’s behavior in certain traffic situations. People’s behavior is difficult to describe, so several models have been developed to manage traffic better. A good example is a driver behavior model in work zones [13]. Model identification and calibration are often used to examine specific areas [10]. The importance of drivers’ behavior models decreases with the spreading of CVs. Every car is predicted to be a CV in a future smart city. Effective adaptive traffic control can only be implemented for CV. Jamal et al. studied in the real test environment the CVs and adaptive control at an intersection [12]. Wu et al. tested the Speed Guidance model using a simulated environment for CV. The model helps CV to approach the intersection at a more optimal speed. The method’s effectiveness was examined according to the CV prevalence rate and traffic density. The Speed Guidance model has been optimized for the intersection signal control scheme [27]. In the future, traffic optimization will also include route planning. Nguyen and Jung have optimized the paths of the CVs using a multi-source, multi-destination ant colony algorithm. Selective (colored) pheromones were used from sensors for the information on road load. Only ants with the same destination pick the same pheromone. A negotiation mechanism was developed for the CV in signal control-free intersections [16].

The paper focuses on the optimization algorithms and does not further investigate the sensors, the CV communication, the data collection, the driver behaviors, and the route planning. These parameters can be used as initial and behavior conditions for the simulation. The paper aims to provide a more efficient scalable simulation-based optimization solution for traffic control. Thereby, Sect. 2 only focuses on different simulation software and optimization methods.

2 Related Literature

There are many possible optimization criteria in transport. Dealing with disparate aspects is a complex task [22]. Al-Turki et al. examined effective traffic control based on time delay, the number of stops, fuel consumption, and emission with the non-dominated sorting genetic algorithm II (NSGAII) in a simulated dual intersection from the real world [3]. In most cases, traffic control aims to ensure the highest possible throughput and delay minimization. The number of passengers is usually not considered the highest possible throughout, although it is crucial. Novačko et al. examined public transport prioritization in Zagreb by simulation. A weighting with an estimated number of passengers was introduced between zero and maximum prioritization. The new weighting strategy has helped optimize traffic based on simulation [18]. There are many metadata, like fuel type, fuel consumption, start-stop settings, number of passengers, and many more to realistically optimize. Knowing the distribution of the listed metadata is not necessarily enough, the route of the specific vehicle should also be considered. Based on the listed reasons we chose only the throughput maximization without the number of passengers. The most used simulation environments are SUMO and VISSIM from PTV Group. SUMO is one of the most famous free traffic simulation software. It allows intermodal traffic systems including different vehicles, public transport, and pedestrians. SUMO has a wealthy number of supporting tools that handle tasks such as route finding, visualization, network import, and emission calculation. SUMO can be enhanced with custom models and provides various APIs to remotely control the simulation [2]. Next to SUMO, another famous traffic simulation software is VISSIM from PTV Group. PTV Group similarly has many software and add-on applications related to traffic. The software group is one of the most popular in real-world applications. There are other good simulation options like AnyLogic, NVIDIA Omniverse, and Aimsun that can be used.

We differentiate two optimization categories: simulation-based optimization and analytical solutions. We chose a simulation environment for the optimization, connecting to the digital twin concept, because it has many advantages like flexibility, easy visualization, and opportunity for scenario analysis. Due to the strong interconnectedness of road networks, evolutionary algorithms have become widespread for fast traffic control optimization. Genetic algorithms are the most common, but differential evolution methods and local derivative-free methods are also used [6]. Hill climbing is the most common derivate-free local search or traffic optimization. Evolutionary-based methods like GA often have quick initial convergence but slow down quickly. They are well-parallelized and applied efficiently for fast and long-term convergence. Genetic algorithms can be boosted with machine learning solutions [14]. Local search methods usually have slower initial convergence in large search spaces but improve continuously to the nearest local optimum. To overcome the disadvantages of the two approaches memetic algorithms have been developed by combining them. Memetic algorithms are not spread in the field of traffic control. There are some not dynamically scalable, not classically memetic algorithms that use static locational operators for sub-dimensional search [9, 21].

Reinforcement Learning (RL) is the other promising solution for traffic optimization. It performs excellently in a homogeneous environment where all intersections have the same property [1, 8]. The main problem with the RL method is the scalability in an inhomogeneous environment because the general rule for every scenario and the communication between different intersections is complex. RL methods are not used with real traffic yet, but they can be viable in the future.

In addition to simulation-based optimization methods, analytical methods become more manageable with the spread of CVs. Mahyar et al. developed an analytical solution for CV and intersections’ optimal synchronous control. They worked with a probability distribution and used a specific layout during the elaboration. Their results can be further generalized [5]. Wang et al. developed a new multi-intersection phase representation of traffic control. This representation can flexibly work from one-to-many intersections [26].

In summary, the current traffic optimization methods are not efficiently scalable or not considering the strong interconnectivity of the traffic system. In Sect. 3, we present the Bacterial Evolutionary Algorithm (BEA) specified for traffic optimization. With the special location-based operator, its use, and the structure of the BEA, we want to provide answers to the listed weaknesses.

3 Memetic Traffic Optimization

One of the most efficient memetic algorithms is the Bacterial Memetic Algorithm (BMA) [7]. The BMA uses a local search embedded in the bacterial evolutionary algorithm (BEA) [15]. BEA includes bacterial mutation and a gene transfer operation. BMA was implemented with unique local parameters for traffic control optimization. The local parameter refers to the hierarchical location-based mutation and local search. Hill-Climbing (HC) was used as a gradient-based local search. Figure 1 shows an overview of the algorithm.

Fig. 1.
figure 1

BMA with local operators and Hill climbing as local search.

Unlike in the general BMA, we used local, area-specific operators. The area-specific operators ensured that the influence of bacterial mutation and gene transfer could be continuously varied from one intersection to the entire study area. Figure 2 shows an example of a change in the area of influence.

Fig. 2.
figure 2

Illustration of different areas of influence and the parallel optimization capabilities using Google map and the topological skeleton of the road network.

Four mutation strategies were used in the mutation phase, and applied to: some of the worst areas, the worst crossing, a random area, or unrelated random crosses were mutated. In the mutation phases, a local search was performed on the genes associated with the area. The local search was performed on the timings of the control sequence. Different strategies have also been added for the gene transfer: replacing the worst area control with the best of the total population for that area, replacing one of the worst areas with one of the bests, randomly transferring an area from a better individual to a worse individual, or random intersection controls of better individuals replace a worse individual’s control strategy. Figure 2 also shows that the applied operators allow the formation of complex regions, that are independent and connected areas for simultaneous optimization. Each variable size area is evaluated separately and may change simultaneously during the bacterial mutation, the gene transfer, and the local search phase.

In addition to the introduced area-specific operators, the evaluation was also area-specific. Area-specific processing significantly increases the manageability of the control optimization. The parameters encoding and the optimization overview are presented in Fig. 3. The individuals contained the list of intersections with the switching sequence, the timings, and the total waiting times. In Fig. 3 at “List of switching state” ‘r’ refers to “red” and ‘g’ refers to “green”.

Fig. 3.
figure 3

Simulation overview.

4 Experiment

A SUMO traffic simulation program was used for the experiments. Real-time route planning and lane change models were not part of the study. The experiments were based on the road network of the 11th district of Budapest, shown in Fig. 4. The simulation included 1055 crossings and 1636 roads, the number of controlled intersections was 69. The exact transport network was extracted from OpenStreetMap [19]. The data is freely available under the Open Database License.

Fig. 4.
figure 4

The Open Street Map view of the 11th district of Budapest.

Figure 5 shows the data collection, initialization, and preparation process for optimization.

Fig. 5.
figure 5

Data collection and pre-processing for the optimization.

4.1 Experiment Description

The starting point for optimization was the traditional fixed-time sequential traffic light control. The duration of each phase was initialized randomly. This has been extended to variable time and sequence control. The number of vehicles was set by the traffic scaling option. It increased quasi-linearly during the simulation time, based on the file containing the default generated route. The vehicles traveled on random routes. Two types of control were compared: circular and adaptive. In the circular case, the traffic light phases repeat a short sequence. In the adaptive case, the result is not necessarily a repetitive switching sequence depending on the traffic condition.

Eight test cases were examined based on the traffic scale, the simulation time, and the control types combination described in Table 1.

Table 1. Tests for the comparison.

As we introduced in Sect. 1 and in Sect. 2 the Genetic Algorithm and the Hill Climbing are the methods that are used in the real world so we chose them as the baseline. A population size of 24 was used for all algorithms. Table 2 contains the parameters for the algorithms. For each algorithm, the number of parallel evaluations was maximized by the size of the population, so in the case of Hill Climbing, 24 random neighbors were examined. In the case of BMA, only the best 8 individuals were mutated in the bacterial mutation, during the gene transfer, random genes were transferred from the better half of the population to all individuals, thus expanding the number of evaluations to 24. The total number of evaluations was \(24\times 50\) in all cases. In the Local BMA, the influence radius of the intersections was randomly chosen in each iteration. In the bacterial mutation, random areas were selected with a 30% chance, worst areas were chosen with a 50% chance, and random intersections were chosen with a 20% chance. In gene transfer, the worst-performing areas were examined with a 30% chance replaced with the best-performing areas of the entire population, with a 50% chance replaced with random from the best-performing half of the population, and a 20% chance of unrelated crossings being transferred from the better half of the population to the worst.

Table 2. Parameters of each algorithm.

4.2 Experimental Results

First, the results of the first 4 tests are presented. 25 replicates were conducted of each test with uniform initialization. In each case, BMA gave the best final result, as shown in Table 3. Both in Table 3 and 4 the mean values and the 95% confidence radius (in round brackets) are presented for the 25 replicates of the total waiting time in seconds.

Table 3. Mean values and the 95% confidence radius (in round brackets) of the total waiting time for the 25 replicates in seconds for cyclic tests.

From Fig. 6, 7, 8 and 9, the optimization process can be seen for every 24 evaluations. The HC algorithm primarily shows the complexity of the task since the entire transport network is connected. A good initial decision may turn into a wrong one later in the other part of the network. BMA takes the lead every time after roughly the 20th batch evaluation. The local search could only work with low efficiency due to resource constraints. In the future, we will examine other local search methods and supplemental methods to improve efficiency. The initial lag from the standard methods in this field is caused by greater elitism. In the future, we plan to investigate a method combined with an initial genetic algorithm.

Fig. 6.
figure 6

Results on Test 1.

Fig. 7.
figure 7

Results on Test 2.

Fig. 8.
figure 8

Results on Test 3.

Fig. 9.
figure 9

Results on Test 4.

Table 4 and Figs. 10, 11, 12 and 13 show the results for the case of adaptive cycle controls. In the adaptive tests, only BMA and GA were compared, since the switching order is more important in this case. Tests 4 and 5 show the difference between the adaptive and traditional switching sequences. Contrary to our preliminary expectations, in the case of a few iterations, the variable series did not prove to be beneficial. More switching options increased the dimension of the search in real-time, not enough time is available to utilize the larger search space. In terms of algorithm comparison, we can see similar results as in the first 4 tests, in addition, the bacterial algorithm can work more efficiently in larger spaces by dividing the entire search space in the bacterial mutation phase.

Table 4. Mean values and the 95% confidence radius (in round brackets) of the total waiting time for the 25 replicates in seconds for adaptive tests.
Fig. 10.
figure 10

Results on Test 5.

Fig. 11.
figure 11

Results on Test 6.

Fig. 12.
figure 12

Results on Test 7.

Fig. 13.
figure 13

Results on Test 8.

4.3 Discussion

A good traffic simulation takes a significant time even with good software. A batch simulation could take around 5\(\ldots \)15% of the real-time in a common computer and 1\(\ldots \)5% in a server computer with the same setting. The modified scalable BMA provided a 35–45% improvement in all test scenarios after 50 parallel evaluations and took the lead after around 18 batch evaluations.

5 Conclusion and Further Work

Traffic simulation is evolving and the required simulation time will decrease in the future. The faster simulations will provide time for more complex optimizations. This article investigated the applied optimization methods in the field of traffic optimization. A new efficiently scalable optimization was developed based on BMA. The proposed flexible area-based BMA can efficiently optimize large areas by scheduled subdivisions. Subareas can vary from one intersection to the entire area. The subareas sizes adjustment was our strategy, so a better compromise was formed between local and global search. Contrary to the literature, the algorithm can be considered a memetic algorithm not only based on location but also subject to a gradient-based method. A further advantage is prioritizing the locations within the population, which helps to perform a focused search in addition to the exploration. Based on the experimental results, the algorithm is suitable for both short-term and long-term optimization and performs better in the case of long-term optimization. As a continuation of the work, we would like to examine control with real large-scale datasets and with more simulation detail.