## 4 Vehicle Agents
### Yielding Behavior  
Unlike pedestrians and other traffic participants, vehicles, due to the constraints of their mechanical structures, typically do not deviate significantly from their driving paths. As a result, pedestrians on the driving route impose greater psychological pressure on drivers, leading them to decelerate more quickly and earlier. Consequently, the IDM cannot be used to describe pedestrian-vehicle interactions. To address this issue, this study proposes an improved IDM based on psychological pressure, as shown in Equation (11).  
\[\dot{v}=a\left[1-\left(\frac{v_{c}}{v_{0}}\right)^{4}-F_{p}(i,k,v_{c},\Delta v _{c})\right] \tag{11}\]  
The equation combines the social force model with the IDM, simulating vehicles that can react to other traffic participants during normal driving, allowing them to slow down in advance to avoid pedestrians ahead. The first part of the equation represents the speed-driving term from the IDM. Since interactions between vehicles are primarily governed by spacing and speed, the speed-driving term in the IDM aligns more closely with the dynamic behavior of vehicles compared to using the driving force from the social force model, where \(\dot{v}\) represents the current vehicle's acceleration, \(a\) is the maximum acceleration or deceleration of the vehicle, \(v_{c}\) is the current speed of the vehicle, and \(v_{0}\) is the desired speed of the vehicle.  
The latter part, \(F_{p}(i,j,v,\Delta v)\), represents the force exerted by pedestrians on vehicles. Inspired by the social force model in crowd simulation, this paper introduces the concept of psychological forces between different traffic participants. When a potential conflict occurs between a pedestrian and a vehicle, the vehicle begins to decelerate and avoid the pedestrian, generating a psychological force in the opposite direction of travel to reduce its speed. The formula for this psychological force \(F_{p}\) is shown in Equation (12), and it is influenced by the vehicle's braking deceleration term within the desired gap and the psychological force between the vehicle and the pedestrian.  
\[F_{p}(i,k,v_{c},\Delta v_{c})=f_{s}(s,s^{*})+\frac{f_{p}(i,k)}{m_{c}} \tag{12}\]\(f_{s}(s,s^{*})\) is the braking deceleration term of the vehicle within the desired distance, and its calculation formula is shown in Equation (13):  
\[f_{s}(s,s^{*})=\left(\frac{s^{*}(v_{c},\Delta v_{c})}{s}\right)^{2} \tag{13}\]  
where \(s\) represents the actual spacing between the vehicle and the adjacent vehicle, and \(s^{*}\) is the current desired spacing of the vehicle, which is calculated based on the difference between the current speed of the vehicle and the speed of the pedestrian. The formula for calculating \(s^{*}\) is shown in Equation (14):  
\[s^{*}(v_{c},\Delta v_{c})=s_{0}+s_{1}\sqrt{\frac{v_{c}}{v_{0}}}+Tp_{c}+\frac{ v_{c}\Delta v_{c}}{2\sqrt{ab}} \tag{14}\]  
where \(b\) is the comfortable deceleration of the vehicle, \(s_{0}\) and \(s_{1}\) are the minimum following distance and waiting distance of the vehicle, respectively, \(T\) is the safe time gap of the vehicle, and \(\Delta v_{c}\) is the velocity difference between the vehicle and the pedestrian in the driving direction.  
\(f_{p}(i,j)\) is the additional psychological force exerted by the pedestrian on the vehicle driver, and its calculation formula is shown in Equation (15):  
\[f_{p}(i,k)=A_{c}e^{-d_{ich}/\mu} \tag{15}\]  
where \(d_{ich}\) is the distance between the pedestrian and the front of the vehicle, and \(A_{c}\) and \(\mu\) are constants, representing the intensity of the repulsive force and the minimum acceptable distance between the vehicle and the pedestrian, respectively.