public class ApproxSimpleTrafficSignalRequestHandler extends Object implements TrafficSignalRequestHandler
| Constructor and Description |
|---|
ApproxSimpleTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
act(double timeStep)
Let the request handler to act for a given time period.
|
TrafficSignal |
getSignal(int laneId)
Get the traffic signal of a lane.
|
StatCollector<?> |
getStatCollector()
Get the statistic collector.
|
void |
processRequestMsg(Request msg)
Process the request message.
|
void |
setBasePolicyCallback(BasePolicyCallback basePolicy)
Set the base policy call-back.
|
void |
setGreenLightDuration(double greenLightDuration)
Get the duration of the green light signal.
|
void |
setYellowLightDuration(double yellowLightDuration)
Get the duration of the yellow light signal.
|
public ApproxSimpleTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration)
public void setGreenLightDuration(double greenLightDuration)
greenLightDuration - the duration of the green light signalpublic void setYellowLightDuration(double yellowLightDuration)
yellowLightDuration - the duration of the yellow light signalpublic void setBasePolicyCallback(BasePolicyCallback basePolicy)
setBasePolicyCallback in interface RequestHandlerbasePolicy - the base policy's call-backpublic void act(double timeStep)
act in interface RequestHandlertimeStep - the time periodpublic void processRequestMsg(Request msg)
processRequestMsg in interface RequestHandlermsg - the request messagepublic StatCollector<?> getStatCollector()
getStatCollector in interface RequestHandlerpublic TrafficSignal getSignal(int laneId)
getSignal in interface TrafficSignalRequestHandlerlaneId - the land IDCopyright © 2013. All rights reserved.