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

Newell's car-following model (2002). More...

#include <newell.h>

Inheritance diagram for newell:
model newell_constrained_timestep newell_random_acceleration martinez_jin_2020

Public Member Functions

 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.
 
pointnew_point (generalized_trajectory *leader, trajectory *follower, params *p=nullptr) override
 Computes the next point in the follower's trajectory using generalized trajectories.
 
- Public Member Functions inherited from model
virtual void validate_parameters (params *p=nullptr)
 Validate the model parameters.
 

Protected Member Functions

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

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.
 

Additional Inherited Members

- Public Attributes inherited from model
paramspars
 Parameters for the car-following model.
 

Detailed Description

Newell's car-following model (2002).

This class implements Newell's car-following model, which is a simplified model that describes how vehicles follow one another in traffic. The model assumes that each vehicle follows the same trajectory as the vehicle in front but delayed by a time gap (τ) and space gap (δ). These parameters are derived from the wave speed (w) and jam density (kj), which are the core elements of the model.

Note
Reference: Newell, G. F. (2002). "A Simplified Car-Following Theory: A Lower Order Model." Institute of Transportation Studies, University of California, Berkeley.

Constructor & Destructor Documentation

◆ newell() [1/2]

newell::newell ( )

Default constructor for Newell's model.

This constructor initializes the model using default values for the wave speed (w), jam density (kj), and free-flow speed.

◆ newell() [2/2]

newell::newell ( p_newell * p)

Constructor for Newell's model with custom parameters.

This constructor allows initializing the model with custom values for the wave speed, jam density, and free-flow speed using the p_newell parameter class.

Parameters
pPointer to the p_newell class containing the parameters for Newell's model.

Member Function Documentation

◆ accel()

double newell::accel ( point * leader,
point * follower,
params * p )
overrideprotectedvirtual

Computes the follower vehicle's acceleration based on the leader's position.

This method calculates the acceleration of the follower vehicle by translating the leader's position and velocity using Newell's piecewise linear trajectory rule.

Parameters
leaderA point representing the leader's position and velocity.
followerA point representing the follower's position and velocity.
pParameters for Newell's model.
Returns
The calculated acceleration of the follower vehicle.

Implements model.

◆ equil_spcg()

double newell::equil_spcg ( double vl,
double vf,
params * p = nullptr )
overridevirtual

Computes the equilibrium spacing between the leader and follower vehicles.

This method calculates the equilibrium spacing between the leader and follower vehicles based on their velocities. The equilibrium spacing increases with higher speeds.

Parameters
vlThe velocity of the leader vehicle.
vfThe velocity of the follower vehicle.
pPointer to the parameters for Newell's model.
Returns
The computed equilibrium spacing between the vehicles.

Implements model.

◆ free_flow_speed()

double newell::free_flow_speed ( params * p = nullptr)
overridevirtual

Returns the free-flow speed for Newell's model.

The free-flow speed is the maximum speed at which vehicles travel when there is no congestion.

Parameters
pParameters for Newell's model.
Returns
The free-flow speed of the model.

Implements model.

◆ initialize_parameters()

void newell::initialize_parameters ( p_newell * p)
protected

Initializes the model parameters for Newell's model.

This function sets the time gap (τ) and jam spacing (δ) based on the wave speed and jam density of the model.

Parameters
pPointer to the p_newell parameters containing wave speed and jam density values.

◆ new_point() [1/2]

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

Computes the next point in the follower's trajectory using generalized trajectories.

This method calculates the next point in the follower vehicle's trajectory by considering both the leader and follower's current trajectories. It applies Newell's piecewise linear trajectory rule to compute the follower's next position and velocity.

Parameters
leaderGeneralized trajectory representing the leader vehicle's path.
followerTrajectory representing the follower vehicle's path.
pParameters for Newell's model.
Returns
A point representing the follower's updated position and speed.

Reimplemented from model.

Reimplemented in newell_constrained_timestep, and newell_random_acceleration.

◆ new_point() [2/2]

point * newell::new_point ( point * leader,
point * follower,
params * p = nullptr )
overrideprotectedvirtual

Computes the next point in the follower's trajectory.

This method determines the next position and velocity for the follower vehicle by translating the leader's trajectory by a time gap (τ) and space gap (δ).

Parameters
leaderA point representing the leader's position and velocity.
followerA point representing the follower's position and velocity.
pParameters for Newell's model.
Returns
A point representing the follower's updated position and speed.

Reimplemented from model.

◆ wave_speed()

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

Returns the wave speed for Newell's model.

The wave speed represents the speed at which traffic disturbances propagate backward through a line of vehicles in congestion.

Parameters
leaderA point representing the leader's position and speed.
followerA point representing the follower's position and speed.
pParameters for Newell's model.
Returns
The wave speed.

Implements model.


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