|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aim4.im.v2i.policy.TimeoutPolicy
public class TimeoutPolicy
The timeout policy.
Nested Class Summary | |
---|---|
static class |
TimeoutPolicy.TimeoutPolicyType
How the V2IManager treats vehicles that communicate before their timeout is over. |
Constructor Summary | |
---|---|
TimeoutPolicy(V2IManager im,
Policy policy)
Create a timeout policy |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeoutPolicy(V2IManager im, Policy policy)
im
- the intersection managerpolicy
- the underlying policyMethod Detail |
---|
public void setV2IManagerCallback(V2IManagerCallback im)
setV2IManagerCallback
in interface Policy
im
- the V2I manager's call-backpublic void sendI2VMessage(I2VMessage msg)
sendI2VMessage
in interface V2IManagerCallback
msg
- a I2V messagepublic int getId()
getId
in interface V2IManagerCallback
public double getCurrentTime()
getCurrentTime
in interface V2IManagerCallback
public Intersection getIntersection()
getIntersection
in interface V2IManagerCallback
public ReservationGrid getReservationGrid()
getReservationGrid
in interface V2IManagerCallback
public ReservationGridManager getReservationGridManager()
getReservationGridManager
in interface V2IManagerCallback
public AdmissionControlZone getACZ(int laneId)
getACZ
in interface V2IManagerCallback
laneId
- the id of the lane
public AczManager getAczManager(int laneId)
getAczManager
in interface V2IManagerCallback
public void act(double timeStep)
act
in interface Policy
timeStep
- the size of the time step to simulate, in secondspublic void processV2IMessage(V2IMessage msg)
processV2IMessage
in interface Policy
msg
- the V2I messagepublic StatCollector<?> getStatCollector()
getStatCollector
in interface Policy
public TrackModel getTrackModel()
getTrackModel
in interface V2IManagerCallback
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |