|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.im.v2i.RequestHandler.ApproxSimpleTrafficSignalRequestHandler
public class ApproxSimpleTrafficSignalRequestHandler
The approximate traffic signal request handler.
| Constructor Summary | |
|---|---|
ApproxSimpleTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApproxSimpleTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration)
| Method Detail |
|---|
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 ID
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||