|
Autopysta
|
Newell (2002) car-following model with a constrained timestep of 1. More...
#include <newell_constrained_timestep.h>
Public Member Functions | |
| newell_constrained_timestep () | |
| Default constructor for the newell_constrained_timestep model. | |
| newell_constrained_timestep (p_newell *p) | |
| Constructor with custom parameters for Newell's model. | |
| void | validate_parameters (params *p=nullptr) override |
| Validates the model parameters, ensuring the timestep is constrained to 1. | |
| point * | new_point (generalized_trajectory *leader, trajectory *follower, params *p=nullptr) override |
| Computes the next point in the follower's trajectory. | |
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 | |
| params * | pars |
| 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. | |
| point * | new_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. | |
Newell (2002) car-following model with a constrained timestep of 1.
This class is a variant of the Newell car-following model, with the only difference being that the timestep is validated and fixed to 1. It inherits all properties and functionalities of the original Newell model.
| newell_constrained_timestep::newell_constrained_timestep | ( | ) |
Default constructor for the newell_constrained_timestep model.
This constructor initializes the model using default parameters for Newell’s car-following model with the timestep constrained to 1.
| newell_constrained_timestep::newell_constrained_timestep | ( | p_newell * | p | ) |
Constructor with custom parameters for Newell's model.
This constructor allows setting custom values for Newell’s car-following model, with the timestep validation constrained to 1.
| p | Pointer to the p_newell parameter class containing model parameters. |
|
overridevirtual |
Computes the next point in the follower's trajectory.
This method calculates the follower’s next position and velocity based on the constrained timestep model.
| leader | Generalized trajectory of the leader vehicle. |
| follower | Trajectory of the follower vehicle. |
| p | Parameters for Newell's car-following model. |
Reimplemented from newell.
|
overridevirtual |
Validates the model parameters, ensuring the timestep is constrained to 1.
This method ensures that the timestep of the model adheres to the fixed value of 1. If any parameter violates this condition, an exception is raised.
| p | Pointer to the params class containing model parameters. |
Reimplemented from model.