|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ILaneChangingMotorAlgorithm
This is implemented by the logic that determines when a vehicle should try to change lane
| Method Summary | |
|---|---|
boolean |
acceptGap(IMotor v,
ILane targetLane,
IMotor targetFollower,
IMotor targetLeader,
double distanceToFollower,
double distanceToLeader,
double distanceToIntersection)
Returns true if the vehicle should accept the current gap and start a lane change |
double |
lookAhead(IMotor v)
Returns the distance a vehicle should look ahead when changing lane |
double |
lookBehind(IMotor v)
Returns the distance a vehicle should look behind when changing lane |
int |
userLaneChangeRequest(IMotor v,
int direction)
Returns -1 to indicate a requirement to change to the left, +1 to indicate a requirement to change lane to the right, or 0 if no lane-change is required |
| Method Detail |
|---|
double lookAhead(IMotor v)
double lookBehind(IMotor v)
boolean acceptGap(IMotor v,
ILane targetLane,
IMotor targetFollower,
IMotor targetLeader,
double distanceToFollower,
double distanceToLeader,
double distanceToIntersection)
int userLaneChangeRequest(IMotor v,
int direction)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||