|
Autopysta
|
The Intelligent Driver Model (IDM) for car-following behavior. More...
#include <idm.h>
Public Member Functions | |
| idm () | |
| Default constructor for the IDM model. | |
| idm (p_idm *pars) | |
| Constructor for the IDM model with custom parameters. | |
| double | equil_spcg (double vl, double vf, params *q=nullptr) override |
| Computes the equilibrium spacing between the leader and follower. | |
| double | wave_speed (point *leader, point *follower, params *p) override |
| Computes the wave speed in a traffic disturbance. | |
| double | free_flow_speed (params *p=nullptr) override |
| Returns the free-flow speed of the IDM model. | |
Public Member Functions inherited from model | |
| virtual void | validate_parameters (params *p=nullptr) |
| Validate the model parameters. | |
| virtual point * | new_point (point *leader, point *follower, params *p=nullptr) |
| Compute the next point for a vehicle. | |
| virtual point * | new_point (generalized_trajectory *leader, trajectory *follower, params *p=nullptr) |
| Compute the next point for a vehicle using trajectories. | |
Additional Inherited Members | |
Public Attributes inherited from model | |
| params * | pars |
| Parameters for the car-following model. | |
Protected Member Functions inherited from model | |
The Intelligent Driver Model (IDM) for car-following behavior.
This class implements the IDM, a widely used microscopic traffic model for simulating car-following behavior. The model computes the acceleration of vehicles based on the distance to the leading vehicle, the relative velocity, and various model parameters.
The IDM captures the transition between free-flow, congested traffic, and stop-and-go waves based on a nonlinear formulation of acceleration and braking.
| idm::idm | ( | ) |
Default constructor for the IDM model.
Initializes the IDM model with default parameters.
| idm::idm | ( | p_idm * | pars | ) |
Constructor for the IDM model with custom parameters.
Initializes the IDM model with custom parameters specified in the p_idm parameter object.
| pars | Pointer to the IDM-specific parameters. |
|
overridevirtual |
Computes the equilibrium spacing between the leader and follower.
Calculates the equilibrium spacing based on the velocities of the leader and follower vehicles. The equilibrium spacing increases with the follower's speed and is influenced by parameters like the safe time headway and jam distance.
| vl | Velocity of the leader. |
| vf | Velocity of the follower. |
| q | Pointer to the IDM parameters. If null, default parameters are used. |
Implements model.
|
overridevirtual |
Returns the free-flow speed of the IDM model.
The free-flow speed is the speed that vehicles would travel at in the absence of traffic.
| p | Pointer to the IDM parameters. If null, default parameters are used. |
Implements model.
Computes the wave speed in a traffic disturbance.
Calculates the wave speed of a traffic disturbance, typically returning 0 unless overridden.
| leader | A point representing the leader's position and velocity. |
| follower | A point representing the follower's position and velocity. |
| p | Pointer to the IDM parameters. |
Implements model.