# Machine Learning-Driven Calibration of Traffic Models Based on a Real-Time Video Analysis
## 2 Analysis of the Influence of the Dynamics of the PTS on the Operation of the VTS  
The processes within the transportation flow can vary depending on the specific focus of the study. When examining traffic flow on a specific section of the road, several overarching factors come into play. These include the overall road infrastructure both within and outside the section being studied [88; 89; 90], as well as temporary factors that can be cyclic, like changes in time of day and seasons [91; 35; 92], or random, such as variations in weather conditions [93]. These global and temporal factors also fluctuate and influence traffic flow characteristics to different extents, which can make simulation modeling quite complex [35; 92]. To simplify this complexity, a limited set of traffic flow parameters is required to develop SMTF and assess the dynamics of each parameter. To compare the data generated in our work [29] using the SMTF we developed with real data from the PTS, we initiated data collection by analyzing the video stream of the simulated path section described in Section 3. In the context of the previous work [27], the selected parameters for addressing the vehicle tracking issue were sensor data that reflect the internal attributes of vehicles while they are in motion. Since these vehicle sensor parameters exhibit a spatial and temporal distribution that aligns with the traffic ODM, analyzing these data offers valuable preliminary insights into the modeled area. Additionally, it supplements global navigation satellite system (GNSS) data in cases where GNSS data are inaccurate or unavailable due to interference or a lack of visible satellites [94; 95]. The data used to train the developed algorithm for tracking vehicle movement included the time mark when a request was sent to connect to an intelligent infrastructure facility, the vehicle's speed, and its rotation angle relative to geographic north. This set of characteristics of vehicles participating in the transport flow demonstrates the dependence of their values on the spatial distribution in the PTS territory, which allows the clustering of many vehicles in this territory. In our application, the ML model classified these vectors, selecting the sector in the direction in which the main lobe of the radiation pattern should be directed to implement the connection or maintain a communication channel between the vehicle and the infrastructure object. During the results analysis [27], a deviation in the ODM was specifically noted, resulting in fluctuations in the frequency of vehicle presence along different segments of the route overall and over specific time intervals. We divided the simulated area into sectors using the Geohash method [96] of GNSS coordinate space, encoding with a code sequence length of 8. Each sector measured 38.2 m by 19.1 m. This level of detail is considered optimal for V2I technology, which typically has an average range of 600 m [6]. The sector sizes were chosen to match the dimensions of route elements like intersections and turns. To analyze the ODM deviation, we carried out simulations in the SUMO environment, where the coordinates of vehicles were tracked when crossing sector boundaries. These coordinates were then ranked by the sectors the vehicles were leaving. The resulting ranked set was compared with real data obtained after processing the video stream, which recorded a similar section of the route. These data also went through a ranking procedure. The differences in the frequency of crossing sector boundaries between the SUMO model and the video stream processing data are presented in Figure 1, where the intersections of the main sectors for the section of the route under consideration were highlighted: v1x2 zfqt, v1x2 zfqv, v1x2 zfqw, v1x2 zfqx, v1x2 zfqy, and v1 xz2 fqz. In Figure 1, only the last two symbols of the cluster hashes are shown on the x-axis for ease of perception. Changes in the ODM led to variations in the distribution characteristics of the generated traffic flow parameters.