Autopysta
Loading...
Searching...
No Matches
lcm Class Referenceabstract

Abstract class for lane-changing models. More...

#include <model.h>

Inheritance diagram for lcm:
lcm_gipps no_lch

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.
 

Detailed Description

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.

Member Function Documentation

◆ is_lch_possible()

virtual bool lcm::is_lch_possible ( point * leader,
point * follower,
point * new_leader,
point * new_follower,
model * cfpars,
params * lcmpars )
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.

Parameters
leaderCurrent leader in the lane.
followerCurrent follower in the lane.
new_leaderNew leader in the target lane.
new_followerNew follower in the target lane.
cfparsCar-following model parameters.
lcmparsLane-changing model parameters.
Returns
True if the lane change is feasible, false otherwise.

◆ lch_left()

virtual bool lcm::lch_left ( point * leader,
point * follower,
point * new_leader,
point * new_follower,
model * cfpars = nullptr,
params * lcmpars = nullptr )
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.

Parameters
leaderCurrent leader in the lane.
followerCurrent follower in the lane.
new_leaderNew leader in the target lane.
new_followerNew follower in the target lane.
cfparsCar-following model parameters.
lcmparsLane-changing model parameters.
Returns
True if the lane-changing maneuver is feasible, false otherwise.

Implemented in lcm_gipps, and no_lch.

◆ lch_right()

virtual bool lcm::lch_right ( point * leader,
point * follower,
point * new_leader,
point * new_follower,
model * cfpars = nullptr,
params * lcmpars = nullptr )
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.

Parameters
leaderCurrent leader in the lane.
followerCurrent follower in the lane.
new_leaderNew leader in the target lane.
new_followerNew follower in the target lane.
cfparsCar-following model parameters.
lcmparsLane-changing model parameters.
Returns
True if the lane-changing maneuver is feasible, false otherwise.

Implemented in lcm_gipps, and no_lch.


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