|
Autopysta
|
Lane-changing model based on the Gipps (1986) behavioral model. More...
#include <lcm_gipps.h>
Public Member Functions | |
| lcm_gipps () | |
| Default constructor for the Gipps lane-changing model. | |
| lcm_gipps (p_lcm_gipps *p) | |
| Constructor for the Gipps lane-changing model with custom parameters. | |
| bool | lch_left (point *leader, point *subject, point *new_leader, point *new_follower, model *cfm, params *lcmpars) override |
| Determine if the vehicle should change lanes to the left. | |
| bool | lch_right (point *leader, point *follower, point *new_leader, point *new_follower, model *cfm, params *lcmpars) override |
| Determine if the vehicle should change lanes to the right. | |
Public Member Functions inherited from lcm | |
Additional Inherited Members | |
Protected Member Functions inherited from lcm | |
Protected Attributes inherited from lcm | |
| model * | _cf |
| Car-following model used in conjunction with lane-changing decisions. | |
| params * | _lcpars |
| Lane-changing model parameters. | |
Lane-changing model based on the Gipps (1986) behavioral model.
This class manages the functionality for vehicle lane-changing decisions, according to the rules defined by Gipps's model. Vehicles decide when to overtake or return to their original lane based on traffic conditions and the parameters from the p_lcm_gipps class.
| lcm_gipps::lcm_gipps | ( | ) |
Default constructor for the Gipps lane-changing model.
Initializes the model with default parameters.
| lcm_gipps::lcm_gipps | ( | p_lcm_gipps * | p | ) |
Constructor for the Gipps lane-changing model with custom parameters.
| p | Custom lane-changing parameters. |
|
overridevirtual |
Determine if the vehicle should change lanes to the left.
The decision to change lanes to the left is based on the vehicle's speed relative to a fraction of the free-flow speed. If the speed is lower than a certain threshold, the lane change will be considered.
| leader | Current leader in the lane. |
| subject | Current vehicle's position and speed (follower). |
| new_leader | The vehicle to become the subject's leader in the new lane. |
| new_follower | The vehicle to become the subject's follower in the new lane. |
| cfm | A car-following model. |
| lcmpars | Lane-changing model parameters. |
Implements lcm.
|
overridevirtual |
Determine if the vehicle should change lanes to the right.
The decision to change lanes to the right is based on the vehicle's speed relative to a fraction of the free-flow speed. If the speed is higher than a certain threshold, the lane change will be considered.
| leader | Current leader in the lane. |
| follower | Current vehicle's position and speed (follower). |
| new_leader | The vehicle to become the subject's leader in the new lane. |
| new_follower | The vehicle to become the subject's follower in the new lane. |
| cfm | A car-following model. |
| lcmpars | Lane-changing model parameters. |
Implements lcm.