Autopysta
Loading...
Searching...
No Matches
idm Class Reference

The Intelligent Driver Model (IDM) for car-following behavior. More...

#include <idm.h>

Inheritance diagram for idm:
model

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 pointnew_point (point *leader, point *follower, params *p=nullptr)
 Compute the next point for a vehicle.
 
virtual pointnew_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
paramspars
 Parameters for the car-following model.
 
- Protected Member Functions inherited from model

Detailed Description

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.

Note
Reference: M. Treiber, A. Hennecke, and D. Helbing, "Congested traffic states in empirical observations and microscopic simulations," Phys. Rev. E, 62, 1805 (2000).

Constructor & Destructor Documentation

◆ idm() [1/2]

idm::idm ( )

Default constructor for the IDM model.

Initializes the IDM model with default parameters.

◆ idm() [2/2]

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.

Parameters
parsPointer to the IDM-specific parameters.

Member Function Documentation

◆ equil_spcg()

double idm::equil_spcg ( double vl,
double vf,
params * q = nullptr )
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.

Parameters
vlVelocity of the leader.
vfVelocity of the follower.
qPointer to the IDM parameters. If null, default parameters are used.
Returns
The equilibrium spacing.

Implements model.

◆ free_flow_speed()

double idm::free_flow_speed ( params * p = nullptr)
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.

Parameters
pPointer to the IDM parameters. If null, default parameters are used.
Returns
The free-flow speed.

Implements model.

◆ wave_speed()

double idm::wave_speed ( point * leader,
point * follower,
params * p )
overridevirtual

Computes the wave speed in a traffic disturbance.

Calculates the wave speed of a traffic disturbance, typically returning 0 unless overridden.

Parameters
leaderA point representing the leader's position and velocity.
followerA point representing the follower's position and velocity.
pPointer to the IDM parameters.
Returns
The wave speed.

Implements model.


The documentation for this class was generated from the following file: