aim4.im.v2i.policy
Class AllStopPolicy

java.lang.Object
  extended by aim4.im.v2i.policy.AllStopPolicy
All Implemented Interfaces:
Policy

public class AllStopPolicy
extends Object
implements Policy

A policy that always denies every reservation request. This is used to represent an intersection that is completely closed off.


Constructor Summary
AllStopPolicy(V2IManagerCallback im)
          Create an all stop 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.
 StatCollector<AllStopPolicy> getStatCollector()
          Get the statistic collector.
 void processV2IMessage(V2IMessage msg)
          Process a V2I 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

AllStopPolicy

public AllStopPolicy(V2IManagerCallback im)
Create an all stop policy

Parameters:
im - the intersection manager
Method Detail

setV2IManagerCallback

public void setV2IManagerCallback(V2IManagerCallback im)
Set the V2I manager call-back.

Specified by:
setV2IManagerCallback in interface Policy
Parameters:
im - the V2I manager's call-back

act

public 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. Only used for policies that don't respond immediately to requests.

Specified by:
act in interface Policy
Parameters:
timeStep - the size of the time step to simulate, in seconds

processV2IMessage

public void processV2IMessage(V2IMessage msg)
Process a V2I message

Specified by:
processV2IMessage in interface Policy
Parameters:
msg - the V2I message

getStatCollector

public StatCollector<AllStopPolicy> getStatCollector()
Get the statistic collector.

Specified by:
getStatCollector in interface Policy
Returns:
the statistic collector


Copyright © 2011. All Rights Reserved.