public class TimeoutPolicy extends Object implements Policy, V2IManagerCallback
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeoutPolicy.TimeoutPolicyType
How the V2IManager treats vehicles that communicate before their timeout
is over.
|
| Constructor and Description |
|---|
TimeoutPolicy(V2IManager im,
Policy policy)
Create a timeout policy
|
| Modifier and Type | Method and Description |
|---|---|
void |
act(double timeStep)
Give the policy a chance to do any processing it might need to do in
order to respond to requests, if it hasn't responded to them already.
|
AdmissionControlZone |
getACZ(int laneId)
Get the Admission Control Zone of a given lane.
|
AczManager |
getAczManager(int laneId)
Get the manager of an ACZ
|
double |
getCurrentTime()
Get the current time
|
int |
getId()
Get the id of the intersection manager.
|
Intersection |
getIntersection()
Get the intersection managed by this intersection manager.
|
ReservationGrid |
getReservationGrid()
Get the reservation grid.
|
ReservationGridManager |
getReservationGridManager()
Get the manager of the reservation grid
|
StatCollector<?> |
getStatCollector()
Get the statistic collector.
|
TrackModel |
getTrackModel() |
void |
processV2IMessage(V2IMessage msg)
Process a V2I message
|
void |
sendI2VMessage(I2VMessage msg)
A callback method for sending a I2V message.
|
void |
setV2IManagerCallback(V2IManagerCallback im)
Set the V2I manager call-back.
|
public TimeoutPolicy(V2IManager im, Policy policy)
im - the intersection managerpolicy - the underlying policypublic void setV2IManagerCallback(V2IManagerCallback im)
setV2IManagerCallback in interface Policyim - the V2I manager's call-backpublic void sendI2VMessage(I2VMessage msg)
sendI2VMessage in interface V2IManagerCallbackmsg - a I2V messagepublic int getId()
getId in interface V2IManagerCallbackpublic double getCurrentTime()
getCurrentTime in interface V2IManagerCallbackpublic Intersection getIntersection()
getIntersection in interface V2IManagerCallbackpublic ReservationGrid getReservationGrid()
getReservationGrid in interface V2IManagerCallbackpublic ReservationGridManager getReservationGridManager()
getReservationGridManager in interface V2IManagerCallbackpublic AdmissionControlZone getACZ(int laneId)
getACZ in interface V2IManagerCallbacklaneId - the id of the lanepublic AczManager getAczManager(int laneId)
getAczManager in interface V2IManagerCallbackpublic void act(double timeStep)
public void processV2IMessage(V2IMessage msg)
processV2IMessage in interface Policymsg - the V2I messagepublic StatCollector<?> getStatCollector()
getStatCollector in interface Policypublic TrackModel getTrackModel()
getTrackModel in interface V2IManagerCallbackCopyright © 2013. All rights reserved.