Urban traffic flow simulation in various weather conditions using long short-term memory-based machine learning - Garbinčius, Giedrius; Makulavičius, Mantas (Transport, 2026)
This study proposes a weather-aware short-term urban traffic prediction framework that combines microscopic traffic simulation with Long Short-Term Memory (LSTM) based Machine Learning (ML) for forecasting vehicle flow at selected urban junctions. The research is motivated by the need to improve traffic-state prediction under varying environmental conditions, since weather disturbances such as rain, fog, and snow significantly affect driver-behaviour, vehicle speed, spacing, and intersection throughput. The simulation environment was developed in the Simulation of Urban Mobility (SUMO) platform using an urban road segment derived from geographic map data and traffic-flow information from the Vilnius city traffic database. 2 monitored junctions were selected as observation points, and traffic behaviour was simulated under 5 weather scenarios: normal conditions, light rain, heavy rain, fog, and snow. Weather-dependent driver parameters, including speed factor, reaction time, acceleration, deceleration, driver imperfection, and minimum gap, were incorporated into the simulation in order to reproduce realistic traffic dynamics. The generated simulation data, including vehicle count, speed, waiting time, temporal features, and encoded weather conditions, were used to train and evaluate multiple LSTM models through an AutoML-based tuning procedure. Among different configurations, the best-performing model consisted of 3 recurrent layers and achieved a validation RMSE of 0.1056 with a validation loss of 0.0652. The results show that the proposed framework is capable of reproducing the general temporal structure of urban traffic flow and preserving the relative ordering of traffic intensity across weather scenarios. Prediction quality was highest under normal conditions, with RMSE of approximately 0.21 veh/min, while the poorest accuracy was observed under snow conditions (about 2.5 veh/min). The model captured dominant traffic trends effectively, although it tended to smooth short-term local oscillations, especially under more unfavourable weather conditions. Overall, the study demonstrates that integrating SUMO-based simulation with LSTM forecasting provides an effective and flexible approach for short-term urban traffic prediction under varying meteorological conditions and may support future intelligent traffic management and weather-adaptive mobility applications.