Autopysta
Loading...
Searching...
No Matches
lcm_gipps Class Reference

Lane-changing model based on the Gipps (1986) behavioral model. More...

#include <lcm_gipps.h>

Inheritance diagram for lcm_gipps:
lcm

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ lcm_gipps() [1/2]

lcm_gipps::lcm_gipps ( )

Default constructor for the Gipps lane-changing model.

Initializes the model with default parameters.

◆ lcm_gipps() [2/2]

lcm_gipps::lcm_gipps ( p_lcm_gipps * p)

Constructor for the Gipps lane-changing model with custom parameters.

Parameters
pCustom lane-changing parameters.

Member Function Documentation

◆ lch_left()

bool lcm_gipps::lch_left ( point * leader,
point * subject,
point * new_leader,
point * new_follower,
model * cfm,
params * lcmpars )
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.

Parameters
leaderCurrent leader in the lane.
subjectCurrent vehicle's position and speed (follower).
new_leaderThe vehicle to become the subject's leader in the new lane.
new_followerThe vehicle to become the subject's follower in the new lane.
cfmA car-following model.
lcmparsLane-changing model parameters.
Returns
True if the lane change to the left is feasible, false otherwise.

Implements lcm.

◆ lch_right()

bool lcm_gipps::lch_right ( point * leader,
point * follower,
point * new_leader,
point * new_follower,
model * cfm,
params * lcmpars )
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.

Parameters
leaderCurrent leader in the lane.
followerCurrent vehicle's position and speed (follower).
new_leaderThe vehicle to become the subject's leader in the new lane.
new_followerThe vehicle to become the subject's follower in the new lane.
cfmA car-following model.
lcmparsLane-changing model parameters.
Returns
True if the lane change to the right is feasible, false otherwise.

Implements lcm.


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