# A Digital Twin for Intelligent Transportation Systems in Interurban Scenarios
## 6 Performance Evaluation Results
### Decision-Making Algorithm
The decision algorithm is designed to find the strategy that minimizes the function's results, as the purpose is to reduce the values of the four parameters. The decision function is designed  
Figure 13: Decision Engine flow diagram. (**a**) Congestion use case diagram. (**b**) Pollution use case diagram. accordingly, assigning positive weights to all parameters and selecting the strategy with the lowest score. The resulting objective function for this use case is as follows:  
\[ \begin{split} Objective\;function=weight\;time*norm(time)+weight\;CO* \\ norm(CO)+weight\;NOx*norm(NOx)+weight\;PM2.5*norm(PM2.5)\end{split}  \tag{5}\]  
We determined the weights through a series of simulations covering a broad set of traffic conditions. The testing scenarios included multiple historical days, different incident locations, and various traffic intensities generated by applying distinct scaling factors. This diversity ensures that the selected weight combination performs robustly across different traffic patterns and is not overfitted to a single specific condition. Through careful analysis of each case, conclusions regarding the best decision were made for each scenario. A large number of weight combinations for the algorithm were tested, ultimately leading to the selection of the most accurate configuration. Tables 1 and 2 present the weights evaluated across a total of 90 simulations, along with the associated error and tolerant error for each weight combination. The tolerant error allows a margin of 10 km/h or one section, enabling the dismissal of less significant errors. The weight combination chosen is the one with lower error and tolerant error for both variable speed limit strategies, whether changing only the incident section (Table 1) or changing previous sections as well (Table 2). In Table 1, the best weight combination is number 6, as it provides the lowest error and tolerant error. In Table 2, the lowest errors are combinations 7, 8, and 10, although combination 6 also provides the lowest error, while the tolerant error is only slightly higher. It can be concluded that the weight combination with the least error is number 6; therefore, the final chosen weights are 5/12 for both average intensity and total travel time, and 2/12 for Speed-Dev-Ratio. Equal weight is assigned to both traffic average intensity and total travel time, as they provide similar, though not identical, outcomes. However, a different weight is allocated to the Speed-Dev-Ratio, which frequently yields better results for lower speed limits, at the expense of significantly increased travel time. Consequently, greater weight is given to travel time and traffic intensity, and less to Speed-Dev-ratio. To select an appropriate combination of weights for the pollution use case, the same methodology was applied. However, the simulations in this case consisted of a pollution episode in each of the 16 sections of the scenario, repeated for the scaling factors. These scenarios, comprising 64 simulations, were further repeated to evaluate cases where the decision was applied to up to three previous sections. The 10 best combinations and their corresponding error results are shown in Tables 3 and 4. In Table 3, results from the standard simulations are presented, where combinations 1 and 4 are the best options, as