|
Autopysta
|
Abstract class for lane-changing models. More...
#include <model.h>
Public Member Functions | |
| virtual bool | lch_left (point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars=nullptr, params *lcmpars=nullptr)=0 |
| Determine if the vehicle should change lanes to the left. | |
| virtual bool | lch_right (point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars=nullptr, params *lcmpars=nullptr)=0 |
| Determine if the vehicle should change lanes to the right. | |
Protected Member Functions | |
| virtual bool | is_lch_possible (point *leader, point *follower, point *new_leader, point *new_follower, model *cfpars, params *lcmpars)=0 |
| Check if a lane change is possible. | |
Protected Attributes | |
| model * | _cf |
| Car-following model used in conjunction with lane-changing decisions. | |
| params * | _lcpars |
| Lane-changing model parameters. | |
Abstract class for lane-changing models.
This class handles the logic for determining whether a vehicle should change lanes based on its current state, the state of nearby vehicles, and model-specific parameters.
|
protectedpure virtual |
Check if a lane change is possible.
This method determines whether a lane change is feasible, based on the position and speed of the leader and follower in both the current lane and the target lane.
| leader | Current leader in the lane. |
| follower | Current follower in the lane. |
| new_leader | New leader in the target lane. |
| new_follower | New follower in the target lane. |
| cfpars | Car-following model parameters. |
| lcmpars | Lane-changing model parameters. |
|
pure virtual |
Determine if the vehicle should change lanes to the left.
This method computes whether the subject vehicle should change lanes to the left, based on the position and speed of nearby vehicles and the lane-changing model parameters.
| leader | Current leader in the lane. |
| follower | Current follower in the lane. |
| new_leader | New leader in the target lane. |
| new_follower | New follower in the target lane. |
| cfpars | Car-following model parameters. |
| lcmpars | Lane-changing model parameters. |
|
pure virtual |
Determine if the vehicle should change lanes to the right.
This method computes whether the subject vehicle should change lanes to the right, based on the position and speed of nearby vehicles and the lane-changing model parameters.
| leader | Current leader in the lane. |
| follower | Current follower in the lane. |
| new_leader | New leader in the target lane. |
| new_follower | New follower in the target lane. |
| cfpars | Car-following model parameters. |
| lcmpars | Lane-changing model parameters. |