public class V2ICoordinator extends Object implements Coordinator
AutoVehicleDriverView
with other Vehicles and with
IntersectionManager
s. This agent is capable of both V2V and
V2I coordination, and uses the current readings of
the vehicle and state in the CoordinatingDriverAgent, along with an
optimism/pessimism heuristic to make reservations. It also
alters the state of the CoordinatingDriverAgent of which it is a part to
reflect the current reservation status.Modifier and Type | Class and Description |
---|---|
static class |
V2ICoordinator.ReservationParameter
Postprocessing the reservation parameters
|
static class |
V2ICoordinator.State
Potential states that a CoordinatingDriverAgent can be in.
|
Constructor and Description |
---|
V2ICoordinator(AutoVehicleDriverView vehicle,
AutoDriver driver,
BasicMap basicMap)
Create an AutonomousCoordinator to coordinate a Vehicle.
|
Modifier and Type | Method and Description |
---|---|
void |
act()
Receive, process, and send messages between Vehicles and
IntersectionManagers, and maintain the reservation status in
the Vehicle.
|
boolean |
getIsDebugging()
Whether the coordinator is in a debug mode
|
V2ICoordinator.ReservationParameter |
getReservationParameter()
Get the confirm message for this driver agent's reservation
|
V2ICoordinator.State |
getState()
Get the current state of the CoordinatingDriverAgent.
|
boolean |
isAwaitingResponse()
Whether or not the DriverAgent is waiting for a response from the
Intersection Manager.
|
boolean |
isTerminated()
Whether of not the coordinator has finished its job.
|
double |
timeToReservation()
Calculate the amount of time, in seconds, until the reservation's arrival
time.
|
public V2ICoordinator(AutoVehicleDriverView vehicle, AutoDriver driver, BasicMap basicMap)
vehicle
- the Vehicle to coordinatedriver
- the driverbasicMap
- the mappublic void act()
act
in interface Coordinator
public V2ICoordinator.State getState()
public boolean isTerminated()
isTerminated
in interface Coordinator
public boolean isAwaitingResponse()
public V2ICoordinator.ReservationParameter getReservationParameter()
public double timeToReservation()
public boolean getIsDebugging()
Copyright © 2013. All rights reserved.