# Calibrating Microscopic Traffic Simulation Model Using Connected Vehicle Data and Genetic Algorithm
## 3 Methods
### Simulation Process  
To run the simulation, each client receives an order from the server. This order includes a simulation run ID, the O/D matrices, the list of connected vehicle information, and values for calibration parameters. The client then opens the VISSIM simulation network, which has already been created and saved in the directory, and starts controlling it using the COM interface. The COM interface of VISSIM is a powerful mechanism that allows programmatic control of VISSIM. This interface is a tool for conducting automated and complex simulation tasks that need high levels of customization and dynamic data handling. The automated process in this study is conducted by multiple Python codes, which were able to interact with VISSIM using the COM interface.  
The client uses the received O/D matrix to populate the traffic input volumes in VISSIM software (version 2024), which, based on the available data from RTMS, can be set at 5 min intervals. Consequently, multiple O/D matrices are entered into the software, one for every five min. The client then starts to adjust the values of the calibration parameters based on the received order. The client runs the simulation for one Simsec, equivalent to 0.1 s. Meanwhile, the client checks the connected vehicle dataset and places the connected vehicle at the designated location if it needs to enter the network at that moment. It also assigns the route decision to the vehicle and records the vehicle ID for future purposes. The client then simulates another step and repeats this process until the end of the simulation.  
After the simulation ends, the client captures and saves the trajectories of the connected vehicles based on their IDs, which are ready to be compared with the ground truth. This comparison is necessary to evaluate the accuracy of the calibration parameters in this run. To ensure statistical robustness and to reduce bias, each client processes the order from the server five times with different random seeds and reports back the median values of the results. Figure 2 presents a summary of the simulation process for each client.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline
**Short Name** & **Long Name** & **Description** & **Unit** & **Default** & **Min** & **Max** \\ \hline W99 cc9 \({}^{*}\) & Acceleration at 80 km/h & 80 km/h acceleration. & m/s\({}^{2}\) & 1.5 & 0.5 & 3 \\ \hline LenRedSpeed & Length of reduced speed & The length of the reduced speed area in the dummy links at the end of the network. & m & - & 0 & 888 \\ \hline DSRedSpeed & Desire speed in reduced speed area & Desire speed in reduced speed area. & km/h & - & 5 & 70 \\ \hline VolInterFlow & Volume of interrupting flow & The number of vehicles that merge into the dummy link to interrupt the main flow. & vehicle/h & - & 0 & 2000 \\ \hline RelFlowExit & Relative flow of exit at the dummy link & The percentage of vehicles that exit the network at the dummy link. & \% & - & 0 & 0.5 \\ \hline LnChgDist & Lane change distance before connectors & The distance before the connector where cars whose routes or paths cross it attempt to select the lane that will get them there without changing lanes. & m & 200 & 100 & 2000 \\ \hline DesSpeed & Desire speed & Desire speed of vehicles in the network. & km/h & 90 & 70 & 120 \\ \hline \end{tabular} \({}^{*}\)Wiedemann 99 parameter.  
\end{table}
Table 2: Cont.