com.azalient.api.sim.agents
Interface IFollowingAlgorithm

All Known Subinterfaces:
IMotorCalibration, IPedestrianCalibration

public interface IFollowingAlgorithm

An agent-following module must implement this interface, to determine which of any visible agents is its leader, and to determine the acceleration and angle of an agent given the selected leader


Method Summary
 IDeltaMotion followingAcceleration(IAgent follower, IAgent leader, double interval)
          Get the acceleration to be applied in the next simulation interval to the follower, given the leader and the length of the interval (time step)
 IAngle followingLookAheadMaxAngle()
          The maximum angle (in degrees) to either side of straight ahead to look for a vehicle to follow
 IAngle followingLookAheadMaxDeltaHeading()
          The maximum angle (in degrees) measured as a difference in heading directions to use when looking for a leader to follow.
 double followingLookAheadMaxDistanceM()
          The maximum distance (m) ahead to look for a vehicle to follow
 boolean useFollowingAngles(IAgent agent)
          Returns true if an agent should use the angle defined by followingLookAheadMaxAngle() and followingLookAheadMaxDeltaHeading().
 

Method Detail

followingLookAheadMaxDistanceM

double followingLookAheadMaxDistanceM()
The maximum distance (m) ahead to look for a vehicle to follow


useFollowingAngles

boolean useFollowingAngles(IAgent agent)
Returns true if an agent should use the angle defined by followingLookAheadMaxAngle() and followingLookAheadMaxDeltaHeading(). If false, the follower will use all visible agents as possible leaders


followingLookAheadMaxAngle

IAngle followingLookAheadMaxAngle()
The maximum angle (in degrees) to either side of straight ahead to look for a vehicle to follow


followingLookAheadMaxDeltaHeading

IAngle followingLookAheadMaxDeltaHeading()
The maximum angle (in degrees) measured as a difference in heading directions to use when looking for a leader to follow. In other words, don't follow an agent going in the opposite direction


followingAcceleration

IDeltaMotion followingAcceleration(IAgent follower,
                                   IAgent leader,
                                   double interval)
Get the acceleration to be applied in the next simulation interval to the follower, given the leader and the length of the interval (time step)