# A Comparative Study on Traffic Modeling Techniques for Predicting and Simulating Traffic Behavior
## 5 Traffic Simulation Models
### Traffic Simulation Algorithms  
The car-following algorithm, the lane-changing algorithm, and the gap-acceptance algorithm are used in microscopic traffic simulation models. However, they can be implemented differently in terms of the vehicle's process of speed deceleration increasing, the gap size, and the accepted and rejected procedures for determining the safe distance between floating vehicles [66]:  
* Car following models: A car-following algorithm is intended to describe how the simulated vehicles interact with the preceding vehicle in the same lane. For any car-following algorithm, the basic parameters used to define the speed-spacing relations are the capacity of a lane, the speed, and the average spacing between the preceding vehicle and the following vehicle [67]. Let \(n\) be the preceding vehicle, and \(n+1\) be  
Figure 4: Illustration for the car-following, lane-change, and gap-acceptance algorithms. the following vehicle with a speed \(s\) and vehicle position \(x\) at time \(t\). Therefore, the speed and position of the preceding vehicle are denoted by \(x_{n}^{t}\) and \(s_{n}^{t}\), respectively. Similarly, the speed and position of the following vehicle are given by \(x_{n+1}^{t}\) and \(s_{n+1}^{t}\), respectively [66; 68]. The acceleration in speed is denoted by \(\alpha\) at time \(t\), and the difference in speed between the preceding and the following vehicle is denoted by \(s\Delta\). Let \(t+T\Delta\) be the time period when the vehicle accelerates, where \(T\Delta\) is the time required for the driver to respond to a changing scenario. As a result, the safe distance between the preceding and the following vehicle is computed as \(x_{n}^{t}-x_{n+1}^{t}\), which we refer to as the space headway \(X\Delta_{safe}\). Let \(\lambda\) be the sensitivity coefficient parameter that is estimated by modeling the sensitivity of the relative distance between the following and preceding vehicles as well as the sensitivity of the relative speed for the subject vehicle [67; 69]. The notations used to describe the car-following algorithm are shown in Figure 5, and the basic equation of the car-following algorithm can be represented as follows:  
\[\alpha_{(n+1)}(t+T\Delta)=\lambda s_{n+1}(t+T\Delta)\frac{T\Delta(t)}{X\Delta (t)} \tag{6}\]  
Let \(\lambda\) be the sensitivity coefficient parameter that is estimated by modeling the sensitivity of the relative distance between the following and preceding vehicles, as well as the sensitivity of the relative speed for the subject vehicle. In traffic simulators, car-following algorithms adopt exact replicas of the car-following maneuvers which are carried out by drivers or automated vehicles in real driving conditions. The essential concept of the car following algorithms is to control the longitudinal motion of vehicles [70]. In real-world settings, autonomous vehicles such as Google cars or Apple cars integrate the data-driven machine learning car by following the model's approach. This approach extracts the patterns or associated rules of drivers' car following strategies and behaviors, in addition to capturing the relationships among variables that can have an impact on the car's following behaviors. This approach yields high accuracy in replicating drivers' car following behaviors for automated vehicles. Another car following model is the kinematics-based approach, which relies on kinematics processes such as the GM, intelligent driver, and safe distance approaches. These approaches adopt an explicit mathematical form, where most of the model parameters have physical meanings and the model outputs can be controlled through refined adjustments of the model parameters [71]. * Lane Changing Models: Lane-changing algorithms are used to simulate the impact of vehicles on adjacent lanes as they change lanes. These algorithms take into account the speed and position of the preceding vehicle as well as the time when this action takes place [72]. The concept of the lane-changing algorithm can be simply described as follows.