aim4.driver
Interface AutoDriverCoordinatorView

All Known Implementing Classes:
AutoDriver, AutoV2VDriver, ProxyDriver

public interface AutoDriverCoordinatorView

An autonomous driver's from the viewpoint of coordinators.


Method Summary
 void addCurrentlyOccupiedLane(Lane lane)
          Add a lane that the DriverAgent's vehicle currently occupies.
 double distanceFromPrevIntersection()
          Find the distance from the previous intersection in the Lane in which the Vehicle is, from the position at which the Vehicle is.
 double distanceToNextIntersection()
          Find the distance to the next intersection in the Lane in which the Vehicle is, from the position at which the Vehicle is.
 IntersectionManager getCurrentIM()
          Get the IntersectionManager with which the agent is currently interacting.
 Lane getCurrentLane()
          Get the Lane the DriverAgent is currently following.
 Road getDestination()
          Get where this DriverAgent is going.
 boolean inCurrentIntersection()
          Whether or not the Vehicle controlled by this driver agent is inside the intersection managed by the current IntersectionManager.
 IntersectionManager nextIntersectionManager()
          Find the next IntersectionManager that the Vehicle will need to interact with, in this Lane.
 void setCurrentLane(Lane lane)
          Set the Lane the DriverAgent is currently following.
 

Method Detail

getCurrentLane

Lane getCurrentLane()
Get the Lane the DriverAgent is currently following.

Returns:
the Lane the DriverAgent is currently following

setCurrentLane

void setCurrentLane(Lane lane)
Set the Lane the DriverAgent is currently following.

Parameters:
lane - the Lane the DriverAgent should follow

addCurrentlyOccupiedLane

void addCurrentlyOccupiedLane(Lane lane)
Add a lane that the DriverAgent's vehicle currently occupies.

Parameters:
lane - a lane that the DriverAgent's vehicle currently occupies

getDestination

Road getDestination()
Get where this DriverAgent is going.

Returns:
the Road where this DriverAgent is going

getCurrentIM

IntersectionManager getCurrentIM()
Get the IntersectionManager with which the agent is currently interacting.

Returns:
the IntersectionManager with which the agent is currently interacting

nextIntersectionManager

IntersectionManager nextIntersectionManager()
Find the next IntersectionManager that the Vehicle will need to interact with, in this Lane. This version overrides the version in Driver, but only to memoize it for speed.

Returns:
the nextIntersectionManager that the Vehicle will need to interact with, in this Lane

distanceToNextIntersection

double distanceToNextIntersection()
Find the distance to the next intersection in the Lane in which the Vehicle is, from the position at which the Vehicle is. This version overrides the version in Driver, but only to memoize it for speed.

Returns:
the distance to the next intersection given the current Lane and position of the Vehicle.

distanceFromPrevIntersection

double distanceFromPrevIntersection()
Find the distance from the previous intersection in the Lane in which the Vehicle is, from the position at which the Vehicle is. This subtracts the length of the Vehicle from the distance from the front of the Vehicle. It overrides the version in DriverAgent, but only to memoize it.

Returns:
the distance from the previous intersection given the current Lane and position of the Vehicle.

inCurrentIntersection

boolean inCurrentIntersection()
Whether or not the Vehicle controlled by this driver agent is inside the intersection managed by the current IntersectionManager.

Returns:
whether or not the Vehicle controlled by this CoordinatingDriverAgent is inside the intersection managed by the current IntersectionManager.


Copyright © 2011. All Rights Reserved.