|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.im.v2i.RequestHandler.Approx4PhasesTrafficSignalRequestHandler
public class Approx4PhasesTrafficSignalRequestHandler
The approximate 4-Phases traffic signal request handler.
| Constructor Summary | |
|---|---|
Approx4PhasesTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration)
Create the approximate 4-Phases traffic signal request handler. |
|
| 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)
Set the green signals duration. |
void |
setYellowLightDuration(double yellowLightDuration)
Set the yellow signals duration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Approx4PhasesTrafficSignalRequestHandler(double greenLightDuration,
double yellowLightDuration)
greenLightDuration - the duration of green signalsyellowLightDuration - the duration of yellow signals| Method Detail |
|---|
public void setGreenLightDuration(double greenLightDuration)
greenLightDuration - the green signal durationpublic void setYellowLightDuration(double yellowLightDuration)
yellowLightDuration - the yellow signal durationpublic 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 | |||||||||