# Calibrating Microscopic Traffic Simulation Model Using Connected Vehicle Data and Genetic Algorithm
## 3 Methods
### Site Description  
As a case study, a section of NJ-3 and NJ-495 eastbound highways in Hudson County, New Jersey, is selected. This section is 2.75 km in length and connects Bergen County in New Jersey to Manhattan, New York City, New York, through the Lincoln Tunnel. As this road serves as one of the connections from the urban areas in New Jersey to the district areas in New York and also connects the Meadowlands Sports Complex (MetLife Stadium) to New York City, it is one of the most crowded roadways in the New York Metropolitan Area. The selected highway segment starts at milepost 9.2 on NJ-3 East and ends at milepost 0.95 on NJ-495 East. Figure 4 shows the selected segment on Google Maps. The highway in the selected segment has two exits to the local roads and other highways and one merging section from NJ-495, which are considered in the study. The first half of the section has three lanes, which are reduced to two lanes in the middle of the section after an exit to another highway. The section then becomes four lanes after a merge from NJ-495 in the last quarter of its length.  
The historical trajectory data for 7 July 2021, from 1 PM to 4 PM--which are the peak hours--are extracted from this dataset. The datasets provide sufficient traffic volume and vehicle trajectory data for the calibration process, though it is important to acknowledge that the data collection occurred during the COVID-19 period. By mid-2021, traffic volumes were rebounding; however, some effects of the pandemic may have persisted. Using geofencing methods, all trajectories outside the selected segment are filtered out. Overall, 338 individual connected vehicles passed through the highway section in the mentioned period. This trajectory dataset is then used as the ground truth in this study.  
Four RTMS at multiple locations collect historical traffic volumes, enabling the counting of vehicles entering, driving through, and exiting the segment. Figure 4 shows the locations of these sensors on the highway segment. To refine the O/D matrix, the number of connected vehicles from the Wejo dataset is subtracted from the RTMS dataset. Finally, for every five min of the simulation, the O/D matrix for non-connected vehicles is created and incorporated into the simulation.  
After each simulation run with predefined parameters, the script extracts the trajectories of vehicles to produce the time-space diagram for each vehicle and calculates the  
Figure 4: The selected highway segment (NJ-3 and NJ-495) on Google Maps alongside the locations of the RTMS.  
error to be minimized during the calibration process, as explained in the previous sections. The VISSIM microsimulation model's parameters are optimized using a GA to improve its correspondence with ground truth data. The GA iteratively adjusts parameters in Table 2 within predefined ranges. At each iteration, the algorithm mutates these parameters with a set mutation rate to explore a variety of configurations. The fitness of each configuration is assessed based on how closely the simulated vehicle trajectories match the actual vehicle trajectories from the Wejo dataset. A population of possible solutions is created, their performance is assessed, and the top performers are chosen for the following generation.  
The GA continuously adjusts driving behavior parameters to reduce the differences between the simulated and real-world data. In this study, 200 generations and 32 populations are conducted with a mutation rate equal to 0.1. These parameters are chosen based on their previous successful application in calibrating traffic simulation models such as [25] and available resources. By striking a balance between exploration and convergence, these values guarantee that the algorithm can successfully reduce the differences between simulated and actual trajectories.