## 6 Using a Simulator to Produce Synthetic Data for Area Speed Control Systems
This file defines the placement of E1-type speed detectors, which were assigned to specific lanes based on geographic coordinates  
Figure 8: The road network used in the simulations (source: own compilation using OpenStreetMap [[https://www.openstreetmap.org/](https://www.openstreetmap.org/)]([https://www.openstreetmap.org/](https://www.openstreetmap.org/)), accessed on 1 May 2025). Figure 7: General diagram of the simulation process (Source: own compilation based on [55]). matched using the assign_detectors.py script. Their geographic coordinates were generated according to the algorithms described in earlier work. These detectors are used to record the speed of passing vehicles during the simulation. All these files, i.e., network (.net.xml), traffic (.rou.xml), vehicle types (.add.xml), and detectors (.add.xml) are merged into a single configuration file speed_simulation.sumocfg, which simulates SUMO (from the console with the script speed_simulation.py) or via SUMO-GUI (in a windowed application). It is also possible to control the simulation via TraCI and Python scripts, which makes it easy to perform further settings, such as imposing different speed limits on the road network. A diagram of the simulation environment architecture is shown in Figure 9.  
The simulation operation results in result files, among them detectors_output.xml, which contains detailed data on the speed of each vehicle passing through the selected measurement point. Using Python scripts, this data is subjected to further analysis. This primarily involves generating speeding statistics and speed distribution histograms with marked legal thresholds (e.g., 40 km/h and 50 km/h). The individual simulation scenarios are used not only to represent real conditions but also to calibrate the model further and compare the results with data from actual road measurements in the controlled area. In addition to the detailed road network data obtained with OpenStreetMap, determining the number of vehicles and simulation time is crucial to the simulation process. The number and type of vehicles were determined using the data and calculation methods outlined in the General Traffic Measurement reports, which are conducted in Poland every five years [56]. However, that is not all. The most crucial part of setting up the simulation environment is determining the types of drivers participating in the simulation, along with their respective percentages of traffic. This juxtaposition determines their driving style, their ability to reach top speed, and their propensity to obey or violate traffic regulations. This naturally includes the tendency to exceed speed limits. Examples of driver types for one of the simulation scenarios are shown in Table 2. The percentage share of individual  
Figure 9: Diagram of the architecture of the simulation environment (Source: own compilation based on [49]). types of drivers and their tendency to exceed speed limits was selected based on additional results and observations made during field research. The data presented in the article concerning SD_02 and SD_07 detectors are partial. This study covered most of the detectors installed in this area, as shown in Figure 3. During the measurements, video images were recorded and then analyzed. In addition to speed measurements, the share of vehicle types in traffic and the tendency of specific types of drivers to exceed speed limits were analyzed. This data was then used to calibrate the simulation parameters. This was performed in such a way that the distribution of the results obtained was as close as possible to the actual data. The individual values in Table 2 mean the folowing:  
* Type (driver type): The name of a driver type that captures their nature and propensity to obey or break traffic laws and driving style. * Accel (maximum acceleration, m/s2): The maximum acceleration that a vehicle can achieve (e.g., when starting or overtaking). A higher value means faster starting and more dynamic driving. Conversely, a lower value indicates a slower start, as in the case of a truck.