com.azalient.api.sim.agents
Interface ILaneChangingMotorAlgorithm


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

lookAhead

double lookAhead(IMotor v)
Returns the distance a vehicle should look ahead when changing lane


lookBehind

double lookBehind(IMotor v)
Returns the distance a vehicle should look behind when changing lane


acceptGap

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


userLaneChangeRequest

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