|
Autopysta
|
Gipps car-following model (1981). More...
#include <gipps.h>
Public Member Functions | |
| gipps () | |
| Default constructor for the Gipps model. | |
| gipps (p_gipps *p) | |
| Constructor with custom parameters for the Gipps model. | |
| void | validate_parameters (params *p=(params *) nullptr) override |
| Validates the parameters of the Gipps model. | |
| double | equil_spcg (double vl, double vf, params *p=(params *) nullptr) override |
| Computes the equilibrium spacing between vehicles according to the Gipps model. | |
| double | wave_speed (point *leader, point *follower, params *p) override |
| Not implemented yet. | |
| double | free_flow_speed (params *p=(params *) nullptr) override |
| Computes the free-flow speed for the Gipps model. | |
| point * | new_point (generalized_trajectory *leader, trajectory *follower, params *p=(params *) nullptr) |
| Computes the next point in the follower's trajectory based on the leader's movement. | |
Public Member Functions inherited from model | |
| virtual point * | new_point (point *leader, point *follower, params *p=nullptr) |
| Compute the next point for a vehicle. | |
Additional Inherited Members | |
Public Attributes inherited from model | |
| params * | pars |
| Parameters for the car-following model. | |
Protected Member Functions inherited from model | |
Gipps car-following model (1981).
This class implements the Gipps (1981) car-following model, which aims to simulate the behavior of vehicles in a traffic stream, particularly how a vehicle responds to the movement of the preceding vehicle. The model is based on realistic driver and vehicle behavior constraints such as maximum acceleration, braking, and desired speeds.
The model introduces two main constraints:
Reference: Gipps, P.G. (1981), "A Behavioural Car-Following Model for Computer Simulation", Transport Research Part B, Vol. 15, pp. 105-111.
| gipps::gipps | ( | ) |
Default constructor for the Gipps model.
Initializes the model with default parameter values, including default values for maximum acceleration, braking, and reaction time.
| gipps::gipps | ( | p_gipps * | p | ) |
Constructor with custom parameters for the Gipps model.
Initializes the model with a custom set of parameters, allowing the simulation to represent different vehicle and driver behaviors.
| p | A pointer to a p_gipps parameter class containing the custom parameters. |
Computes the equilibrium spacing between vehicles according to the Gipps model.
The equilibrium spacing is the safe distance that vehicles should maintain, accounting for the vehicle's speed and the driver's braking limits.
| vl | The velocity of the leader vehicle. |
| vf | The velocity of the follower vehicle. |
| p | Parameters for the Gipps model. If null, the model uses its default parameters. |
Implements model.
Computes the free-flow speed for the Gipps model.
The free-flow speed represents the maximum speed the vehicle can travel at, assuming there is no interaction with other vehicles ahead (i.e., no leader).
| p | Parameters for the Gipps model. If null, the model uses its default parameters. |
Implements model.
|
virtual |
Computes the next point in the follower's trajectory based on the leader's movement.
This function computes the next position, speed, and acceleration of the follower vehicle based on the current position of both the leader and follower vehicles. The model applies both acceleration and braking constraints to ensure safe car-following behavior.
| leader | Generalized trajectory of the leader vehicle. |
| follower | Trajectory of the follower vehicle. |
| p | Parameters for the Gipps model. If null, the model uses its default parameters. |
Reimplemented from model.
Validates the parameters of the Gipps model.
Ensures that the parameters for maximum acceleration, braking, and reaction time are non-zero and valid. If invalid, an exception is thrown.
| p | Parameters for the Gipps model. If null, the model uses its default parameters. |
Reimplemented from model.
Not implemented yet.
This function is a placeholder for the wave speed calculation. In the Gipps model, the wave speed is not explicitly calculated.
| leader | A point representing the leader's position and speed. |
| follower | A point representing the follower's position and speed. |
| p | Parameters for the Gipps model. |
Implements model.