|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectaim4.config.TrafficSignalPhase
public class TrafficSignalPhase
The traffic signal phases.
Constructor Summary | |
---|---|
TrafficSignalPhase(GridMap map,
List<String> strs)
Construct a traffic signal phases. |
Method Summary | |
---|---|
ApproxNPhasesTrafficSignalRequestHandler.CyclicSignalController |
calcCyclicSignalController(Road road)
Generate a signal controller for a road. |
List<Road> |
getActiveRoads(int phaseId)
Get the list of the names of the roads that are active in the phase. |
double |
getGreenDurations(int phaseId)
Get the duration of the green signals. |
int |
getPhaseNum()
Get the number of phases. |
double |
getRedDurations(int phaseId)
Get the duration of the red signals. |
double |
getYellowDurations(int phaseId)
Get the duration of the yellow signals. |
static TrafficSignalPhase |
makeFromFile(GridMap map,
String csvFileName)
Create a new traffic signal phase object from file |
String |
toString()
Get a string description of the signal phases. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TrafficSignalPhase(GridMap map, List<String> strs)
map
- the map of the simulationstrs
- the description of the direction based on the name of the
roads.Method Detail |
---|
public static TrafficSignalPhase makeFromFile(GridMap map, String csvFileName)
map
- the mapcsvFileName
- the file name of the CSV file
public int getPhaseNum()
public List<Road> getActiveRoads(int phaseId)
phaseId
- the phase ID
public double getGreenDurations(int phaseId)
phaseId
- the phase ID
public double getYellowDurations(int phaseId)
phaseId
- the phase ID
public double getRedDurations(int phaseId)
phaseId
- the phase ID
public ApproxNPhasesTrafficSignalRequestHandler.CyclicSignalController calcCyclicSignalController(Road road)
road
- the road
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |