# A Digital Twin for Intelligent Transportation Systems in Interurban Scenarios
## 6 Performance Evaluation Results
### Decision-Making Algorithm  
This subsection outlines the procedure for designing the decision algorithms for the congestion and pollution use cases. Following the previous analysis, a new batch of simulations is performed to determine an objective function that selects the strategy providing the best values for the KPIs described in Section 4.2. The subsection is organized to first address the congestion use case, followed by a discussion on the pollution use case. The digital twin's decision-making process involves conducting a series of simulations. These simulations use the current vehicle flows on the highway, as well as information regarding any detected incidents. Initially, a simulation with the default speed limits is performed that replicates the real-time scenario. Using the results from this default simulation, the effectiveness of the different strategies can be assessed. Subsequently, additional simulations are performed using the same scenario, each implementing different strategies. If the incident trigger is a congestion situation, the Decision Engine proposes two independent strategies that would alleviate traffic congestion: implementing a percentage of re-routing and altering the speed limits in specific sections of the highway. In the case  
Figure 12: Pollution simulation results for variable speed limit strategy applied to the incident and previous sections. of the trigger being a pollution episode prediction, the variable speed limit strategies are simulated, and only a speed recommendation is proposed by the Decision Engine. The algorithm followed for decision-making is shown in Figure 13.  
To determine the re-routing percentage, a pre-computed fundamental traffic diagram depicting a comparable traffic situation is consulted. Using the results from the default simulation and the fundamental traffic diagram, the required re-routing percentage is calculated based on the desired average speed (cf. Section 6.1.2). Additional simulations are run to validate the impact of this re-routing percentage. In contrast, to determine the variable speed limit strategy, a batch of simulations is run to evaluate the behavior of various speed limits across different highway sections. Once the results for each strategy are computed, the best strategy is determined using an objective function, which presents some variations depending on the incident type. For the congestion use case, the objective function assesses three parameters deemed most important (cf. Section 6.1.1): traffic average intensity, total travel time, and Speed-Dev-Ratio of the highway in the direction of the incident. The objective is to maximize traffic average intensity and Speed-Dev-Ratio while minimizing the total travel time. Recall that the average occupancy provides similar results to the average intensity, as they are inversely proportional, so it has not been considered. To facilitate fair comparison, the outputs of each parameter are normalized, removing the units and ensuring equitable assessment. Then, precomputed weights are applied, assigning varying degrees of importance to the different parameters. Finally, the chosen strategy is the one that maximizes the result of the following equation:  
\[ \begin{split}& Objective\;function=weight\;intensity*norm(intensity)-\\ & weight\;time*norm(time)+weight\;ratio*norm(speed-dev- ratio)\end{split}  \tag{4}\]  
For the pollution use case, the objective function structure is the same, but presents some modifications. Out of all the parameters, four KPIs are used by the decision module to select the most optimal strategy for reducing pollution levels. These include the three pollutants (CO, NOx, and PM\({}_{2.5}\)) and a traffic parameter, the total travel time. The inclusion of time ensures that traffic flow is not significantly negatively affected by the strategies, while still prioritizing the goal of the use case, which is to mitigate vehicle emissions.