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

Laval et al. (2014) car-following model with random acceleration behavior. More...

#include <newell_random_acceleration.h>

Inheritance diagram for newell_random_acceleration:
newell model

Public Member Functions

 newell_random_acceleration ()
 Default constructor for the random acceleration model.
 
 newell_random_acceleration (p_newell_random_acceleration *p)
 Constructor with custom parameters for Newell's and Laval's models.
 
void validate_parameters (params *p=(params *) nullptr) override
 Validates the model parameters for consistency.
 
pointnew_point (generalized_trajectory *leader, trajectory *follower, params *p=(params *) nullptr) override
 Computes the next point in the follower's trajectory considering random acceleration.
 
- Public Member Functions inherited from newell
 newell ()
 Default constructor for Newell's model.
 
 newell (p_newell *p)
 Constructor for Newell's model with custom parameters.
 
double equil_spcg (double vl, double vf, params *p=nullptr) override
 Computes the equilibrium spacing between the leader and follower vehicles.
 
double wave_speed (point *leader, point *follower, params *p) override
 Returns the wave speed for Newell's model.
 
double free_flow_speed (params *p=nullptr) override
 Returns the free-flow speed for Newell's model.
 
- Public Member Functions inherited from model

Additional Inherited Members

- Public Attributes inherited from model
paramspars
 Parameters for the car-following model.
 
- Protected Member Functions inherited from newell
void initialize_parameters (p_newell *p)
 Initializes the model parameters for Newell's model.
 
double accel (point *leader, point *follower, params *p) override
 Computes the follower vehicle's acceleration based on the leader's position.
 
pointnew_point (point *leader, point *follower, params *p=nullptr) override
 Computes the next point in the follower's trajectory.
 
- Protected Member Functions inherited from model
- Protected Attributes inherited from newell
float tau
 Time gap (τ) between the trajectories of the follower and the leader.
 
float sj
 Jam spacing (δ), the minimum distance between vehicles in a jam.
 

Detailed Description

Laval et al. (2014) car-following model with random acceleration behavior.

This class implements a variant of Newell’s car-following model that includes random acceleration dynamics, as introduced by Laval et al. (2014). The model captures variability in driver behavior, incorporating stochastic fluctuations in vehicle acceleration.

Constructor & Destructor Documentation

◆ newell_random_acceleration() [1/2]

newell_random_acceleration::newell_random_acceleration ( )

Default constructor for the random acceleration model.

Initializes the model using default values for both Newell’s and Laval’s model parameters, including random acceleration settings.

◆ newell_random_acceleration() [2/2]

newell_random_acceleration::newell_random_acceleration ( p_newell_random_acceleration * p)

Constructor with custom parameters for Newell's and Laval's models.

This constructor allows initializing the model with custom values for both Newell’s car-following parameters and Laval's random acceleration model parameters.

Parameters
pPointer to the p_newell_random_acceleration class containing the parameters.

Member Function Documentation

◆ new_point()

point * newell_random_acceleration::new_point ( generalized_trajectory * leader,
trajectory * follower,
params * p = (params *) nullptr )
overridevirtual

Computes the next point in the follower's trajectory considering random acceleration.

This method calculates the follower's next position and velocity, incorporating the random acceleration behavior introduced by Laval's model.

Parameters
leaderGeneralized trajectory representing the leader's position and speed int time. Leave null for no leader.
followerTrajectory representing the follower's position and speed in time. Leave null for no follower.
pParameters for Laval’s car-following model.
Returns
A point representing the follower's updated position and speed.

Reimplemented from newell.

◆ validate_parameters()

void newell_random_acceleration::validate_parameters ( params * p = (params *) nullptr)
overridevirtual

Validates the model parameters for consistency.

This method checks the parameters for both Newell's and Laval’s models to ensure they meet the required conditions.

Parameters
pPointer to the params class containing model parameters.

Reimplemented from model.


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