|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.driver.Driver
aim4.driver.AutoDriver
public class AutoDriver
An agent that drives a AutoVehicleDriverView while coordinating with
IntersectionManagers and other Vehicles. Such an agent consists
of two sub-agents, a Coordinator and a Pilot. The two
agents communicate by setting state in this class.
| Field Summary |
|---|
| Fields inherited from class aim4.driver.Driver |
|---|
currentLane, currentlyOccupiedLanes |
| Constructor Summary | |
|---|---|
AutoDriver(AutoVehicleDriverView vehicle,
BasicMap basicMap)
|
|
| Method Summary | |
|---|---|
void |
act()
Take control actions for driving the agent's Vehicle. |
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. |
Coordinator |
getCurrentCoordinator()
Get the current coordinator of the vehicle. |
IntersectionManager |
getCurrentIM()
Get the IntersectionManager with which the agent is currently interacting. |
AutoVehicleDriverView |
getVehicle()
Get the Vehicle this DriverAgent is controlling. |
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. |
| Methods inherited from class aim4.driver.Driver |
|---|
addCurrentlyOccupiedLane, getCurrentLane, getCurrentlyOccupiedLanes, getDestination, getSpawnPoint, setCurrentLane, setDestination, setSpawnPoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface aim4.driver.AutoDriverCoordinatorView |
|---|
addCurrentlyOccupiedLane, getCurrentLane, getDestination, setCurrentLane |
| Methods inherited from interface aim4.driver.AutoDriverPilotView |
|---|
getCurrentLane, setCurrentLane |
| Constructor Detail |
|---|
public AutoDriver(AutoVehicleDriverView vehicle,
BasicMap basicMap)
| Method Detail |
|---|
public void act()
act in interface DriverSimViewact in class Driverpublic AutoVehicleDriverView getVehicle()
getVehicle in interface AutoDriverPilotViewgetVehicle in interface DriverSimViewgetVehicle in class Driverpublic Coordinator getCurrentCoordinator()
public IntersectionManager getCurrentIM()
getCurrentIM in interface AutoDriverCoordinatorViewgetCurrentIM in interface AutoDriverPilotViewpublic IntersectionManager nextIntersectionManager()
Driver, but only to memoize it for
speed.
nextIntersectionManager in interface AutoDriverCoordinatorViewnextIntersectionManager in class Driverpublic double distanceToNextIntersection()
Driver, but only to memoize it for
speed.
distanceToNextIntersection in interface AutoDriverCoordinatorViewdistanceToNextIntersection in interface AutoDriverPilotViewdistanceToNextIntersection in class Driverpublic double distanceFromPrevIntersection()
distanceFromPrevIntersection in interface AutoDriverCoordinatorViewdistanceFromPrevIntersection in class Driverpublic boolean inCurrentIntersection()
inCurrentIntersection in interface AutoDriverCoordinatorView
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||