1 Introduction

The current development studies on connected vehicles are mainly focused on transmitting data between vehicles and infrastructure (Chou et al., 2009; Zhao et al., 2016). These communication technologies are called V2V (vehicle-to-vehicle) and V2I (vehicle-to-infrastructure). The objective behind this communication is to transmit data such as stationary or slow vehicle warnings, emergency vehicle warnings, and road works warnings to the onboard units (OBU), which are embedded in the connected vehicles, to increase the awareness of the drivers (Yang et al., 2014). The data is sent from the roadside units (RSU) utilizing connection technologies such as dedicated short-range communications (DSRC) and 5G technology (Dey et al., 2016; Ndashimye et al., 2017). These advanced technologies are promising in terms of being useful in the development of connected and autonomous vehicles since with the transmitted traffic information, which can be sent to autonomous vehicles through RSUs, CAVs can be used in managing traffic. Since CAVs are active agents in the traffic flow, the implementation of traffic management systems, which are based on the usage of CAVs, has significant potential.

Advancements in connected and autonomous vehicles and the concept of utilizing these vehicles in traffic and traffic management systems have attracted the attention of various studies. Through the conducted studies, various benefits of this integration have been proven and brought to the literature. One improvement of these systems is that they reduce traffic densities at both the overall network and at the site of incidents (Gokasar et al., 2022a, 2022b). Another improvement is that CAV-enabled incident management algorithms reduce travel time, average stop delay, vehicle stops, fuel consumption, and carbon emission (Farrag et al., 2020). All these benefits considered, connected autonomous vehicles will be implemented into incident management algorithms as soon as they are ready to be deployed in real-world traffic flows.

Another research area that has attracted the attention of researchers is deep learning and machine learning subjects. With the development of communication technologies in vehicular systems, data transmission is made possible. This concept enabled connected vehicles to be used as sensors in traffic (Emami et al., 2020). Thus, traffic data such as density, speed, and flow can be collected via the connected vehicles. These data have the potential to be used in prediction algorithms, which are modelled using deep learning models (He et al., 2020). The output of these models is the future state of the traffic based on the current conditions. When traffic and incidents are managed using predicted future traffic data, congestion that will occur in the future can be foreseen and CAV-enabled traffic and incident management algorithms can be deployed before the congestion becomes too severe. By implementing such systems, the effect of incident-induced shockwaves can be mitigated to a great extent (Wismans et al., 2019).

In this study, a novel traffic management method, namely IDILIM, is proposed. In this method, a prediction model named Pix-to-Pix is used, which uses Convolutional Neural Networks (CNN) and Conditional Generative Adversarial Networks (cGAN), to predict the future state of the traffic. The collected traffic data is transformed into traffic heatmaps and is given as input to the prediction model. The output of the model is the heatmap of the next 3 min. Thus, the traffic data for the next 3 min are received using the prediction model. Using the predicted traffic data, the shockwave speed of 2 min later is calculated and given as input to the traffic management system. CAVs are instructed to make their speeds equal to the calculated shockwave speed. Implementation of this management method reduces the traffic flow into the area at which the effects of the shockwave are seen. This makes the discharge from the critical region easier and more efficient and decreases the density values in the incident region.

The proposed traffic management method is novel and advanced. There is a scarcity of research on the operation of connected autonomous vehicles in combination with models that make predictions through deep learning algorithms and use the predicted data to manage traffic more efficiently. In this context, IDILIM is an innovative and effective method brought to the literature by this study.

2 Literature review

Even though vehicular communication is fairly new, there are studies in the literature investigating faster and more efficient data transmission technologies. For instance, in a different study, the use of 5G in V2I (vehicle-to-infrastructure) technology for the precise and accurate localization of vehicles is investigated (del Peral-Rosado et al., 2016). According to this study, 5G is promising in means of this implementation. In another study, the feasibility of LTE and mmWave communication technologies are investigated (Giordani et al., 2019). Results indicate that LTE is promising in terms of robust and fair connection and mmWave is considerable in the future’s high throughput demands of emerging automotive applications. Considering the advancements in communication and autonomous vehicle technologies, it is not far from today that connected and autonomous vehicles will be a part of real-world traffic flow.

In addition to the developments in communication and autonomy technologies, due to the fast increase in urban population and traffic volumes in metropolitan regions, traffic and incident management have gained high importance (Djahel et al., 2015). This increased the number of studies regarding traffic and incident management in the literature. In a different study, simulations of the Variable Speed Limits (VSL) incident management algorithm are conducted (Dia et al., 2008). Results of the simulation study show that there is an improvement of 11% in traffic efficiency and an improvement in traffic safety due to the homogenization of the traffic flow in high-speed regions. In another study, an incident management framework named STIMF (Smart traffic incident management framework) is proposed (Farrag et al., 2021). In the context of this framework, different incident management algorithms are simulated based on the detected incident, and a fuzzy-logic inference system is used to recommend the most effective incident management method based on the current incident conditions.

In light of the advancement in connected autonomous vehicles and the need for incident management applications, researchers have shifted their focus on integrating CAVs into incident management algorithms. In a different study, simulation studies of the integration between Car2X communication technologies and traffic incident management systems are conducted (Farrag et al., 2020). Results indicate a decrease of 6% in travel time, 9% in average stop delay, 27% in vehicle stops, and 16% in fuel consumption and carbon monoxide emission. In a study, a novel incident management algorithm, namely SWSCAV, which utilizes CAVs in incident management, is proposed (Gokasar et al., 2022a, 2022b). Results demonstrate a decrease in density values over 38 veh/km/lane and 28 veh/km/lane in the critical region of the incident by 12.68% and 8.15% respectively. It is stated that even at low CAV percentage rates, the proposed algorithm can reduce density values throughout the network.

Even though CAV-enabled traffic incident management demonstrates promising improvements, there are studies in the literature to develop these incident management systems further. One example is the combination of deep learning algorithms with traffic incident management methods. The main approach to using deep learning is in the incident detection side of the management systems. In a different study, Convolutional Neural Networks (CNN), which is a deep learning algorithm, is utilized in incident detection (Zhu et al., 2018). Results of the studies show a higher detection rate and lower false positive rate compared with the traditional incident detection algorithms, which use deep learning methods. In another study, Generative Adversarial Network (GAN) is used to expand the size of incident data and balance datasets, and a temporal and spatially stacked autoencoder (TSSAE) is used to detect incidents (Li et al., 2020). The results of the study indicate that the proposed method outperforms some of the traditional benchmark models. In a different study, a novel fuzzy deep learning-based incident management method is proposed (El Hatri & Boumhidi, 2018). This method utilizes a Stacked Auto-Encoder (SAE), and the results of the study show an increase in the detection rate and a decrease in the false alarm rate.

Through the conducted literature survey, it is seen that many of the deep learning-based incident management algorithms focus on the incident detection of the traffic network. In this study, the proposed incident detection method, namely IDILIM, utilizes CNN and Conditional GAN (cGAN) networks in the process of predicting future conditions of the traffic and providing estimated inputs for the method, which is a unique contribution to the literature. Also, there is a lack of studies on CAV-enabled incident detection algorithms. IDILIM also utilizes CAVs in the process of managing traffic. Therefore, this study is unique in terms of the used technologies and the provided improvements.

3 Theory

3.1 Pix2Pix cGAN algorithm and traffic heatmap analogy

Pix2Pix is a CNN (Convolutional Neural Network) based cGAN (Conditional General Adversarial Network) type that can take an image as an input and obtain another image with the same dimensions. The reason why it was preferred in this study is that the distribution of the average speed, density, and flow values, which are the basic parameters of the traffic, in the time–space plane has a similar feature to a single-layer picture matrix. As seen in Fig. 1, the location and time values correspond to the x and y coordinates in the picture matrices, and the intensity value of the traffic at that moment and location corresponds to the color values.

Fig. 1
figure 1

Density heatmap

Another reason for choosing a CNN-based system is that the sliding window system is suitable for predicting the behavior of traffic. In a scenario where we assume that the sliding window is 2 × 2, the values of the parameter at that location and at the previous location at the instant and at the previous measurement times are used for the estimation of the traffic parameter at any location in the future. In traffic systems, each of these values is highly dependent on the other.

The Pix2Pix architecture consists of two different mechanisms. The mechanism that works first creates the estimated heatmap from the traffic heatmap taken as input, and the second mechanism tests whether this heatmap is derived. These are called generator and discriminator, respectively. As with almost most GAN systems, the generator tries to trick the discriminator. The cGAN uses the following function to calculate the loss:

$${\mathcal{L}}_{cGAN}(G,D) = {\mathbb{E}}_{x,y}[\mathrm{log} D(x,y)] + {\mathbb{E}}_{x,z}[\mathrm{log}(1- D(x,G(x,z))]$$
(1)

In Eq. (1), x is the traffic heatmap segment matrix, z is the random noise vector, and y is the heatmap segment from the estimated 3 min later. G is the generator function and D is the discriminator function. G(x,z) tries to approach y in each iteration. In other words, the loss between the G(x,z) function and the estimated heatmap is tried to be minimized. In this way, it will be more likely to fool D, which is the discriminator function. The classical L1 distance is used to train the generator function (2).

$${\mathcal{L}}_{L1}(G) = {{\mathbb{E}}_{x,y,z}[ ||y - G(x,z)||}_{1} ]$$
(2)

Thus, the final function, which aims to achieve the minimum error of the generator mechanism and the maximum accuracy of the discriminator function, is as follows:

$${G}^{*}=arg\underset{G}{\mathrm{min}}\,\underset{D}{\mathrm{max}}{\mathcal{L}}_{cGAN}\left(G,D\right)+\lambda {\mathcal{L}}_{L1}\left(G\right)$$
(3)

CNN architecture has been tested with 16 different architectures. The architecture with the least loss has 1-64-64-128 neuron orientation, a 4 × 4 frame size, and no dropout. In Fig. 2, the traffic density heat map estimated by the Pix2Pix algorithm is shown. The left-most image is the input heatmap image, the image in the middle is the target image and the right-most image is the predicted density heatmap image.

Fig. 2
figure 2

The traffic density heat map estimated by the Pix2Pix algorithm

In the image below, the input density heatmap, expected output heatmap, and predicted heatmap is given in the time–space plane, from left to right, respectively. The intensity increases as the colors change from blue to yellow.

3.2 IDILIM: incident detection included linear management

Autonomous and connected vehicle technologies are rapidly evolving. One positive aspect of these technologies is that they provide the location, duration, and status information to be transmitted to vehicles in short periods. This information is obtained by processing data collected by other vehicles, mobile devices, sensors, cameras, and infrastructure on vehicles or at the source. In connected vehicle technologies, any information or data can now be provided from vehicle to vehicle, from vehicle to infrastructure, and from vehicle to any information source.

A world where information flow being so fast makes it possible to manage traffic more reactively and dynamically. In one study, the position and speed dynamics of the shock wave are processed and speed and position information are transmitted to the vehicles (Gokasar et al., 2022a, 2022b). In this system, traffic heat maps for a certain period were estimated by processing instant traffic data. With the assistance of these heat maps, the limit of the shock wave after a certain time was obtained and its speed was found, and the vehicles that were behind a constant distance with the downstream limit of the shock wave were managed. This management was again achieved by giving a constant shock wave speed. In this study, instead of giving the shock wave speed and distance directly to the vehicles, it is aimed to keep these two values dynamic.

Shock wave speed (w) is the rate at which the shock wave propagates per unit of time. Free flow speed (v) is the speed at which vehicles move at their desired speed without being affected. In this study, an uninterrupted road network is used to maintain free flow speed. In this road network, sensors placed at intervals of 500 m perform the task of collecting, processing, and transmitting data.

The working principle of the proposed system is given in Fig. 3. The main principle of this system is to ensure that the place where the shock wave limit will reach after 3 min does not disturb the continuity of the vehicles in the free flow. To achieve this, firstly, the situation of the traffic and shock wave after 3 min is estimated with the Pix2Pix algorithm. The shock wave speed after 3 min will be determined with the predicted heat maps thanks to Pix2Pix. The shock wave speed of predicted heatmaps is calculated as follows:

$$w =\frac{{q}_{s}-{q}_{s-1}}{{k}_{s}-{k}_{s-1}}$$
(4)

where \({q}_{s}\) is the instantaneous flow value at location \(s, {q}_{s-1}\) is the instantaneous flow at location \(s-1\), which is 500 m behind \(s\), \({k}_{s}\) is the instantaneous density at location \(s\), \({k}_{s-1}\) is the instantaneous density at location \(s-1\).

Fig. 3
figure 3

The illustration of IDILIM

To reduce the impact of shock wave propagation on the continuity of the vehicles’ motion, each vehicle will reduce its speed by the shock wave speed. That is, each vehicle will reduce its speed to (instantaneous speed - shock wave speed) after receiving the command.

Not only the shock wave speed but also the shock wave location will be determined by the estimated algorithm. From the shock wave location determined according to this estimation, the distance control distance equal to the distance that the vehicles would reach with reduced speed was selected. The reason for this is to prevent the system’s effectiveness from decreasing by starting the system from a back distance. Therefore, the control distance, which is the distance that the vehicles will take,

$$Xcontrol = {(V}_{freeflow}- w) t$$
(5)

where \({X}_{control}\) is the predicted control distance of the traffic, \({V}_{freeflow}\) is free flow speed of the traffic, w is the predicted shockwave speed, t (the control time) is the desired time interval for control.

In this system, the t-value computation involves some steps. In the system that operates every 15 s, the shock wave speed may fluctuate continuously and/or losses may occur due to sensor frequency. Therefore, it would not be correct to take 180 s directly. Therefore, with the help of the 3-min heatmap, the amount of shock wave propagation will be obtained and the duration will be determined accordingly. The t value is calculated as follows:

$$t=\frac{{d}_{sw}}{{\omega }_{avg}}$$
(6)

where dsw = 3 min, the shockwave boundary position change, \({\omega }_{avg}\) = 3-min-average shockwave speed. Since the data is collected every 15 s, the average shockwave speed will be the average of 12-time intervals. The instantaneous shock wave speed can be an outlier value so the average shock wave speed is used to reduce the effect of this outlier. During the simulation, the shock wave speed is limited to 5 km/h as the lower limit and free flow speed as the upper limit not to get affected by the possible low data quality of real-life applications or outliers. t = the control time.

In this study, there are some assumptions made while modeling IDILIM. These assumptions are listed below.

  • Connected autonomous vehicles can continuously receive information from the infrastructure and know their location clearly and accurately at all times.

  • Connected autonomous vehicles implement the instructions given to them within the scope of IDILIM in the fastest way.

  • Connected autonomous vehicles reduce their speed linearly. When the speed of the vehicles is equal to the shockwave speed, the speed of the connected autonomous vehicles is fixed.

  • The measured instantaneous and location-dependent traffic density data show wave characteristics.

  • Vehicles never increase their speed above the maximum speed threshold. At the same time, when a directive is sent to the connected autonomous vehicles to reduce their speed below 10 km/h, the connected autonomous vehicles do not comply with this directive.

3.3 Variable speed limits

Variable speed limits (VSL) is a real-time traffic management method. By implementing this method, the aim is to reduce the speed of vehicles with the speed limits reflected on the electronic traffic boards behind the area where traffic congestion is present. By regulating vehicle speeds and reducing them to the desired speed limit, the number of vehicles arriving at the incident area. In this way, the intensity of traffic congestion due to incidents can be reduced and the control of these traffic congestions and the evacuation process after the incident becomes more efficient. At the same time, by reducing vehicle speeds, sharp deviations in vehicle speeds are prevented and more stable speeds are obtained.

In Fig. 4, there is an illustration of VSL traffic management applied on a 4-lane highway with 3 lanes open to traffic. Within the scope of the application, it is expected that the speed of the vehicles will be reduced to 60 km/h.

Fig. 4
figure 4

Illustration of VSL traffic management applied on a 4-lane highway (TRUMM, 2010)

Some variables need to be determined and assigned values for the modeling of the VSL management method in the SUMO simulation environment. These variables are listed as follows:

  • Control Distance (meters): The distance between the incident location and the electronic traffic board reflecting the VSL speed instructions.

  • Compliance Rate: The rate at which autonomous and human-driven vehicles comply with the target speed shown on the VSL boards.

  • Target Speed (km/h): The speed limit at which vehicle speeds are requested to be reduced within the scope of the VSL application

The electronic traffic board reflecting the VSL target speed is located as far as the control distance from the incident area. Human-driven and autonomous vehicles comply with the VSL system at different rates. The variables of the VSL modeled in the simulation environment and the values assigned to these variables are available in Table 1.

Table 1 VSL variables used in simulation studies

One electronic traffic board is used in VSL simulation scenarios. The VSL board is located 1000 m behind the incident location. An illustration of the VSL board location is available in Fig. 5. The yellow lines represent the sensors and the distance between each sensor is 500 m. The blue block represents the incident location.

Fig. 5
figure 5

Illustration of VSL board location

The assumptions made while integrating the VSL management method into the simulation environment are as follows:

  • The VSL application is activated 300 s after the incident. At the same time, the VSL application continues for 300 s after the incident is completely removed from the network.

  • Drivers can see electronic traffic boards from 30 m away. After seeing the boards, they decide on complying or not complying with the VSL guidelines within a maximum of 2 s.

  • Drivers who comply with the VSL directive reduce their speed to the target speed as quickly as possible.

  • Connected autonomous vehicles comply with VSL directives 100%, while human-driven vehicles comply with 50%.

  • The same target speed value is reflected for each lane on the electronic traffic board.

3.4 Standard normal deviation (SND) incident detection algorithm

For incident management systems to work, an incident must be detected first. In the simulation study, the SND incident detection algorithm is used.

Standard Normal Deviation (SND) is a statistical incident detection algorithm that uses the parameter mean value and standard deviation calculated over historical traffic data. The algorithm is created by placing the mean value and standard deviation of a traffic parameter, which will be strongly affected by an incident, calculated over the normal flow of traffic into the SND as given in Eq. (7).

$$ SND = \frac{{x(j,t) - \overline{x}(j,t)}}{s} > T_{SND} $$
(7)

\(x(j,t)\): The value of the traffic parameter at position j and at time t, \(\overline{x}(j,t)\): The average value of the traffic parameter at position j and time t, s: The standard deviation of the traffic parameter at position j and time t, TSND: The threshold value of the SND algorithm.

The traffic parameter used in the SND algorithm is the traffic density. By using the density data obtained as a result of the simulation studies, the mean density value, standard deviation, and SND threshold value are obtained. These values are available in Table 2.

Table 2 Mean density, standard deviation, and SND threshold values

4 Methodology

Simulation studies are conducted using SUMO traffic simulation software. SUMO is an open-source simulation program. Simulations are done using TraCI (Traffic Control Interface), which is a python programming library connected with SUMO (Wegener et al., 2008). The usage of python in the simulation studies is an advantageous aspect due to providing numerous possibilities in the scenario set.

4.1 Simulation network

SUMO has an integrated network editing program named “NetEdit”. Using this application, an uninterrupted traffic facility is constructed, which is shown in Fig. 6.

Fig. 6
figure 6

Simulation network

As seen in Fig. 6, the main road length of the constructed uninterrupted road network is 10 km and there are 200 m of entrance and exit zones at the beginning and end of the network. The leading and trailing 200 m of extra roads are the warm-up and cooldown parts of the simulation. Vehicle accelerations and decelerations in those areas can be deceiving. Thus in the analysis part, those parts of the network are not considered. When all parts are considered, the total length of the road network becomes 10.4 km. There are 21 sensors in total along the network. Data collection is done using these sensors. There is a distance of 500 m between each sensor. The road network continues with 3 lanes along the entire road length. The lane width is fixed and is 3.2 m.

4.2 Simulation scenarios

In the process of constructing the scenarios, which are to be simulated, different incident scenarios are created. Initially, the variables to be used in simulation studies were determined, namely location, duration, lane of the incident, CAV percentage, and traffic demand. The variables and their values are given in Table 3.

Table 3 Variables of scenarios

Considering the variables given in Table 3, there are 33 different scenarios in the simulations made over the road network, with 11 percent of autonomous vehicles and 3 different traffic demands. Each scenario is run with 20 different seeds. Within each seed, the accident location, duration, and lane changes. Since the seed set is kept constant throughout the study, each 20 different incident scenarios are simulated using different traffic demands and CAV percentages. Thus, the effect of the management algorithm on different incident scenarios in different traffic demands and autonomous vehicle percentages can be examined.

Scenarios are simulated using the SUMO traffic simulation software for 90 min. In the process of analyzing the collected data, the data corresponding to the first 15 and the last 15 min are removed from the data set. The reason for this is that the first 15 min and the last 15 min are considered warm-up and cool-down intervals. Since the analysis of the data obtained in these intervals does not give meaningful results, it is excluded from the data set.

4.3 Vehicle type modelling

In the simulation studies carried out on the SUMO Traffic Simulation software, two different vehicle types are defined as human-driven and autonomous vehicles. The factor that makes these vehicle types different from each other is the characteristic features assigned to the vehicles. Characteristics of human-driven and autonomous vehicles are given in Table 4.

Table 4 Characteristics of human-driven and autonomous vehicles

4.4 Simulation integration

For the integration studies carried out, initially, the systems that will provide input to incident detection and management algorithms should be established. The systems created in this direction are explained below.

4.4.1 Data storage system

Since the created traffic parameter estimation models predict the next 3 min of traffic using the data of the past 3 min, the traffic parameter data of the past 3 min should be stored during the simulation study. For this reason, in addition to the instantaneous data collected from the sensors, the past 11 15-s data collected for each sensor needs to be stored.

Thus, 12 empty lists were created per traffic parameter. The following lists can be given as examples of the lists created. Square brackets indicate that the expressions are lists.


ParameterStorage_Last = []

ParameterStorage _15 = []

ParameterStorage _30 = []

ParameterStorage _45 = []

ParameterStorage _165 = []


After the incident detection is done, the traffic parameter prediction model starts working with the introduction of IDILIM. Since the traffic parameter prediction model takes heatmaps as input, 3-min historical parameter data is transformed into a heatmap and given as input to the prediction model.

4.4.2 Incident location detection system

VSL traffic management method works by reflecting the target speed value on the electronic traffic board, which is located as far as the control distance from the incident location. For this reason, one of the inputs to be given to the VSL traffic management algorithm is the incident location. Therefore, an incident location detection system has been established to accurately detect the incident location.

The incident location detection system is integrated with the incident detection algorithm. The incident detection algorithm used in this study works by taking traffic parameter data collected separately for each sensor in the last 15 s of every minute as input. The incident detection algorithm used in this study performs incident presence checks for each sensor. If an incident presence signal is received from any sensor, this sensor is determined as the incident location. If the incident detection algorithm detects incidents in 2 or more consecutive sensors, the sensor position that is farthest in the direction of traffic flow is taken as the incident location.

4.4.3 Shockwave boundary and shockwave speed detection system

The created shockwave boundary detection system starts to work after the incident is detected and works in an integrated manner with the incident detection algorithm. The average traffic data of the last 15 s of every minute is given as input to the incident detection algorithm. The sensor data collected in the last 15-s time interval is processed within the incident detection algorithm to determine which sensors give an incident signal. With the obtained sensor list, the starting location of the shockwave, the ending location, and all sensors between these two locations are obtained. Among the sensors located within the shockwave boundaries, the sensor located at the back in the direction of traffic flow determines the rear boundary of the current shockwave. Thus, at the end of every 1 min, the boundaries of the shockwave are updated and the shockwave boundary detection system outputs the rear boundary of the shockwave.

Another output required by the IDILIM is shockwave velocity. After determining the rear boundary of the shockwave, the shockwave velocity is calculated by using the density and flow data of the sensor corresponding to the rear boundary and the previous sensor.

4.4.4 Traffic parameter prediction system with Pix2Pix prediction model

After incident detection, the traffic parameter prediction system is activated, and the 3-min historical traffic parameter data kept in the data storage system is converted into a heat map and given as input to the traffic parameter prediction system.

The traffic parameter prediction system uses the past 3 min of data to predict the data for the next 3 min and outputs the predicted 3 min of data as a heatmap. The resulting 3-min traffic heatmaps contain 12 data rows of 15 s of data. After the traffic parameter prediction model is activated, the 8th row of the predicted 12-row data, which is the last 15 s of the 2nd minute, is given as input to the incident detection algorithms for predicted shockwave boundary and speed calculations.

4.5 Modeling algorithms in the simulation environment

4.5.1 Standard normal deviation algorithm (SND)

Input

  • When the SND algorithm is modeled together with the VSL traffic management method and integrated into the simulation environment, it uses real-time density data collected from the sensors as input. 21 average density values collected from the sensors in the last 15 s of every 1 min are given as input to the SND equation given in Eq. 7.

  • When the SND algorithm is modeled with the IDILIM and integrated into the simulation environment, it takes real-time density data as input until incident detection occurs. The density data of the last 15 s of each minute is given to the SND algorithm. However, after the incident detection is done, the traffic parameter prediction model starts to work and the density data for the next 3 min is predicted by using the previous 3 min' density data. The storage of the density data of the past 3 min is carried out with the establishment of the data storage system. The estimated 3-min data consists of 12 15-s rows of data. The 8th data row, which is the density data of the last 15 s of the 2nd minute, is given as input to the SND algorithm.

Output

  • When the SND algorithm is modeled with the VSL traffic management method, it gives the incident location as output. To give this output, an incident location detection system is established and used.

  • When the SND algorithm is modeled with the IDILIM, the shockwave rear boundary and shockwave speed are given as output. To give this output, a shockwave boundary, and shockwave speed detection system is established and used.

4.5.2 Variable speed limits (VSL)

VSL traffic management method is activated 300 s after the incident detection and takes the incident location as input. The target speed of 50 km/h is reflected on the electronic traffic board, which is placed 1000 m behind the detected incident location. Connected autonomous vehicles comply with the target speed reflected on the board at a rate of 100%, while human-driven vehicles comply at a rate of 50%. VSL traffic management method stops working 300 s after the incident detection algorithm gives no accident signal.

4.5.3 The proposed method: IDILIM

IDILIM takes the rear boundary of the shockwave and the shockwave speed as inputs. Any incident detection algorithm modeled with IDILIM gives these data as output and IDILIM starts managing the traffic using these data. Each connected autonomous vehicle in the region between the dynamically predicted shockwave rear boundary and the location obtained by going back from this position by a dynamically calculated control distance reduces its speed by the shockwave speed.

5 Measure of effectiveness

In this study, the percentage change of density and average speed values are used as the measures of effectiveness. These values were recorded in every scenario for every sensor location every 15 s throughout the simulation. However, examining these values on average throughout the entire simulation will both reduce the probability of seeing the effect of the traffic management methods used on a percentage basis, and will also create confusion by showing the instantaneous increases seen in the recovery process that do not affect the flow and safety of the traffic. For this reason, the changes within the critical region defined by the authors will be examined. The critical region is the least square that encloses the entire shock wave in the time–space domain as shown in Fig. 7.

Fig. 7
figure 7

Critical region illustration on the time–space domain

6 Results

In this study, traffic density and average speed values, which are directly proportional to travel time in traffic, are examined in the performance evaluation stage. It is necessary to investigate heatmaps to see how the traffic is affected in general. In Fig. 8, two density heatmaps for the same scenario for IDILIM and VSL implementation. When the density heatmap of IDILIM is examined, it is seen that the high shockwave speed allowed the front congestion to reach the recovery state more easily as the incident was managed from 4000 m away. Thus, loss of time caused by stop-and-go motions and small headway times was prevented and full recovery was achieved despite an incident at 2600th second. The congestion that started with the second wave of vehicles following this recovery was resolved again before the shockwave went too far back. Due to the alarm given by the SND algorithm, slight deceleration management was provided at the 1500th meter of the road network towards the end of the simulation. This can be solved by further strengthening the SND algorithm or by incident detection methods provided with different algorithms (Gokasar et al., 2022a, 2022b).

Fig. 8
figure 8

Density heatmaps of the same scenario managed by a IDILIM, b VSL

When the scenarios are examined case-by-case, the analogy of each traffic parameter point falling in the time–space plane of the traffic heatmap to the picture pixels will be used. At this point, the change in the ratio of pixels with high density in the critical region (CR) to other pixels will be examined. In Table 5, the results of the scenario, which is constructed with 1500 vehicles/lane/hour demand and 30% penetration rate, run with the second seed are given. In this table, the base scenario shows the scenario where the incident occurred but was not managed. Preliminary simulation studies on the road network show that the critical density is 35 vehicle/kilometer. In addition, 25 vehicle/kilometer density was also measured as the traffic density where radical decreases in the speed of the vehicles were observed. In the base scenario, density values were higher than 35 veh/km in 12.58% of all pixels. This percentage was reduced by 52.43% by VSL, and an improvement of 89.32% was observed by IDILIM implementation. Similar rates of decreased behavior were also observed in pixels with a density higher than 25 veh/km. At average speeds, the VSL method gave slightly better performance. However, if speeds are not reduced so radically while an incident is being managed, values ​​such as 51 km/h on average are more robust in terms of safety.

Table 5 Results of the scenario, which is constructed with 1500 vehicles/lane/hour demand and 30% penetration rate, run with the second seed

Density-time and average speed-time graphs constructed using the same scenario and seed are given in Fig. 9. When Fig. 9a is examined, average speed data collected from the sensor located before the incident location shows that the IDILIM method provides faster recovery. Also, investigating Fig. 9b, density data regarding the IDILIM method show higher traffic density values in the recovery phase. Although it seems to contradict the higher average speed of VSL in Table 5, this is a single sensor data. In other words, since the IDILIM method reduces the speed of the vehicles, it performed better at the region of the sensor located before the incident location, which is important for traffic safety and recovery.

Fig. 9
figure 9

a Average Speed vs. Time, b Density vs. Time plots of traffic management methods

In Fig. 10, the time-dependent variation of the average speed data obtained from the sensor located before the incident location is given by assigning a different PR to each color. The PR of 40% in VSL and IDILIM methods requires very low-speed reduction during traffic management. In another study, it was observed that a 40% penetration rate yielded much better results when managing traffic with autonomous vehicles (Gokasar et al., 2022a, 2022b). In the VSL system, the recovery speed is the factor that makes the difference according to the percentage of autonomous vehicles, while the time required for management and the management time in the IDILIM method makes the difference. As the penetration rate increased, the velocities decreased much later, remained low for longer, but recovered faster.

Fig. 10
figure 10

Average Speed vs. Time graphs according to penetration rates for a IDILIM method and b VSL incident management method

7 Conclusion

Connected autonomous vehicles have become one of the most trending topics in recent years. The reason for this is not only their ability to make autonomous decisions but also the high speed and range of receiving and transmitting the information. In light of this information, the traffic data that the vehicles can give from their location and the fast response times of these vehicles, and the ability to process and apply the incoming information, can be used to manage the traffic more accurately and regularly. In addition, vehicles can be routed not only with instant data but also with processed traffic data and the data of the future status of the predicted traffic. In this study, high-accuracy traffic forecast data is provided by another trending topic, Pix2Pix cGAN. Another important point of this study is IDILIM, which is a state-of-art traffic management method on how vehicles can be managed in a system where autonomous vehicles know their instantaneous location information and speed. A traffic network was established where the data was taken discretely from the sensors, and from this network, the vehicles were informed about how they should control their speed in a certain range of the road network. As the discreteness of the data decreases, the system will be able to make much more accurate estimates and measurements. Vehicles that know their position and speed have also taken action in line with this information. The SND algorithm, on the other hand, was used in the detection of statistically unusual situations, and it was used in functions such as determining the shockwave limit, incident detection and triggering the actions of autonomous vehicles. Although the vehicles react quickly, the traffic forecasting algorithms enable the vehicles to take action according to the situation after 2 min, not the instantaneous state of the traffic, for the whole system to react faster and without loss. At this point, the analogy of the parameter illustration of the traffic in the time–space plane with a single-layered and pixel-based picture is used. In this way, Pix2Pix, a CNN-based cGAN, has significantly increased the performance of the system.

Hence, the cGAN-supported IDILIM method was compared with VSL, which is a very common and universal traffic management method. Although it does not contribute to the average speed as much as VSL, it has a high contribution to traffic density, early recovery of the incident, and traffic safety. In this system, in which vehicles are managed from the rear and with less loss, both the travel time of the vehicles is noticeably reduced and the safety is greatly increased. The proposed new method, IDILIM, provides more secure management with a different traffic behavior in terms of recovery and traffic management. The most important factors that provide this are that it is a dynamic system, and it progresses by making accurate traffic forecasts with high-accuracy CNN-based cGAN. The limitations of this study are the assumptions given throughout the study and the large sensor range. As time progresses, the data collected from the sensors will be collected from the vehicles, and much more accurate results can be obtained with more homogeneous and densely distributed data sources.