# Calibrating Microscopic Traffic Simulation Model Using Connected Vehicle Data and Genetic Algorithm
## 3 Methods
### Overall Architecture  
The process presented in this study consists of multiple stages. The overall process is summarized in Figure 1. A server handles the main process and controls other resources and computers. In the current study, an Intel NUC 12 Pro Mini PC running the Ubuntu 20.04.5 LTS operating system is used. However, due to the nature of the code, any computer with any operating system can perform the server function. As the ground truth, the trajectories of connected vehicles must be obtained. To create the simulation model, vehicle volume should be collected from the real world. If the connected vehicle dataset contains information about all the vehicles in the network, it can be used to calculate vehicle volumes for the simulation model. In most traffic networks, the market penetration of connected vehicles is not one hundred percent. Therefore, this study suggests using a traffic data collection method capable of counting vehicle volumes at multiple locations within the network. This dataset is useful for determining the total number of vehicles driving in the network, including connected and non-connected vehicles. The combination of these two datasets is used to create an origin-destination (O/D) matrix, which serves as the input for the VISSIM simulation network. The data from connected vehicles are used separately to evaluate the calibration process. Having the O/D matrix and vehicle trajectories, the server is ready to start the calibration process.  
Figure 1: Overview of the proposed calibration framework, including server and client processes. The client-side simulation process is detailed in Figure 2.  
Calibrating a microscopic simulation model is a non-trivial task that generally demands numerous repetitive simulation runs with different parameter values. To expedite the process, instead of running the simulation on a single computer, this research adopts a distributed computing architecture, allowing multiple computers (i.e., clients) to conduct simulation tasks and send the results back to the server. Multiple desktop and laptop computers running the Windows 11 operating system are used as clients in this study. The clients utilize the Component Object Model (COM) interface to control the VISSIM software Version 2024.00-10 (PTV Group, Karlsruhe, Germany) which is discussed briefly in the following subsections. The server generates multiple sets of values for calibration parameters and sends these sets, along with the O/D matrices and vehicle trajectories, to the clients one by one. Each client uses the O/D matrix as input for the VISSIM model and automatically changes the default values of calibration parameters according to the server's instructions. After running the simulation, the results are compared to the vehicle trajectories, which serve as the ground truth. Each client evaluates the current calibration process and sends the results back to the server. The server then gathers all the results and attempts to optimize the calibration parameters for the next iteration. More details about these stages are presented in the following subsections.