Page 36 - SMILESENG
P. 36

Intl. Summer School on Search- and Machine Learning-based Software Engineering
 traffic data and a combination of both; and (4) 10 traffic patterns covering regular week days, weekends, bank holidays and summer holidays, among others.
V. LEARNING TRAFFIC PATTERNS
Based on the 10 traffic patterns previously mentioned, a 1- year traffic dataset was generated. For each day, depending on its traffic pattern (week day, weekend day, etc.), the traffic was randomly generated according to the different traffic intensities established per hour. In order to add some more randomness and realism to the data, a “noise” policy consisting in swapping the traffic patterns of a few (randomly selected days) and, within a few days, the traffic intensities defined by the corresponding pattern, was implemented.
The generated traffic dataset was used to train the “Traffic Light Predictor” component of the SmartTLC framework so that it could predict the traffic pattern at any given date and hour. Five machine learning models were trained using this data: (1) Naive Gaussian Bayes (NGB); (2) Support Vector Machines (SVM) both linear and polynomial; (3) K-Nearest Neighbors (KNN); (4) Decision Trees (DT); and (5) Random Forest (RF). These models were trained both using only time- related information (hour, day, month and year) and extending it with traffic-related information (actual vehicles passing per hour). An hyperparameter tuning approach was used in order to achieve even better predictions.
The complete results achieved using the five different mod- els, in terms of elapsed time and F1 score, are available in [6](section 5.2.3). As expected, using both time- and traffic- related information achieves much better results. The best model using only time-related information was DT (F1 score 0.6924), while the best one using both time- and traffic-related information was KNN (F1 score 0.9998). The fastest one was DT in both cases (0.0010 seconds).
VI. RESULTS
We have considered four different traffic light control al- gorithms. The “no-adaptation” approach, based on a fixed- cycle with green and red phases of identical duration (common approach in most current traffic lights), was developed to be used as a reference baseline. Then, the other three algorithms implemented an adaptive approach consisting in proportionally increasing the duration of the green phase for the direction with a higher traffic intensity. The main difference among these three algorithms is how they identify the current traffic demand: (1) the “date-based” approach predicts the current traffic intensity based only on historical data (e.g., if today it is Monday and it is 14:00, the traffic intensities NS and EW are likely to be high and medium, respectively. Thus, increase the duration of the green phase for NS). As expected, this approach performs much better than the no-adaptation approach when the traffic behaves more or less as predicted (hopefully, most of the time). However, if it doesn’t, it may eventually worse traffic congestion. The main benefit of this approach is that it does not require real-time traffic monitoring (which can be economically quite expensive), although it
requires a dataset generation and a traffic pattern learning process (both computationally expensive); conversely, (2) the “real-time” approach adapts the traffic lights based only on real-time data. Obviously, this approach performs much better than the two previous ones as it takes into account actual (vs predicted) traffic conditions and, thus, can instantly react to changes. In this case, benefits and limitations are opposite to those described for (2). Finally, (3) the “combined” approach uses both historical and real-time data to adapt the traffic light phases. The results achieved in this case are almost identical to those obtained by (2). However, this approach allows adapting the real-time monitoring frequency, relaxing it when the traffic behaves more or less as predicted, and increasing it when not.
VII. CONCLUSION AND FUTURE WORKS
The results achieved in this preliminary research demon- strate that, even when no real-time data is available (either because there is no monitoring infrastructure or because it eventually fails), it is possible to reduce traffic congestion using historical data and learning traffic patterns from it. Furthermore, when real-time data is available, it is possible to use predicted traffic patterns to lower the computational load required to monitor the traffic conditions and dynamically adapt the traffic lights accordingly. It is worth mentioning that the SmartTLC framework, developed as part of this work, has been designed to be easily extended, supporting arbitrary complex topologies, new traffic patterns, and traffic light control strategies. A detailed description of the SmartTLC framework can be found in [6], and its implementation can be downloaded from [7].
Some future works include: (1) enriching the scenarios with pedestrians and new types of vehicles; (2) considering special adaptation policies for emergency vehicles (e.g., fire trucks or ambulances); (3) supporting additional traffic light control algorithms; (4) using more complex artificial intelligence mod- els to predict traffic intensity; (5) running simulations on more complex topologies and allowing drivers to perform additional actions (e.g., turn both left and right, overtaking, etc.); and (6) model how the traffic information obtained in a particular junction can be propagated to neighbor ones considering their distance, possible escapes and new traffic contributions from non-monitored roads, etc.
REFERENCES
[1] EITforUrbanMobility:Solvingthemobilitychallengesfacingourcities together, https://www.eiturbanmobility.eu/ (2021).
[2] U. S. EPA: Fast Facts on Transportation Green- house Gas Emissions, https://www.epa.gov/greenvehicles/ fast-facts-transportation-greenhouse-gas-emissions (2021).
[3] Hedges Company: How many cars are in the world in 2022: Market Research, https://hedgescompany.com/blog/2021/06/ how-many-cars-are-there-in-the-world/ (2021).
[4] U. S. EIA: International Energy Outlook 2021, https://www.eia.gov/ outlooks/ieo/index.php (2021).
[5] Eclipse SUMO. https://www.eclipse.org/sumo/.
[6] LozanoPinilla,Jose´R.SmartTLC:ASmartTrafficLightControlSystem
for Urban Environments. MSc. Thesis (2022).
[7] Lozano Pinilla, Jose´ R., SmartTLC Implementation (2022).
24













































































   34   35   36   37   38