public class Approx4PhasesTrafficSignalSimSetup extends BasicSimSetup implements SimSetup
distanceBetween, lanesPerRoad, laneWidth, medianSize, numOfColumns, numOfRows, speedLimit, stopDistBeforeIntersection, trafficLevel
Constructor and Description |
---|
Approx4PhasesTrafficSignalSimSetup(BasicSimSetup basicSimSetup)
Create a setup for the simulator in which the intersections are
controlled by 4-phases traffic signals.
|
Approx4PhasesTrafficSignalSimSetup(int columns,
int rows,
double laneWidth,
double speedLimit,
int lanesPerRoad,
double medianSize,
double distanceBetween,
double trafficLevel,
double stopDistBeforeIntersection)
Create a setup for the simulator in which the intersections are
controlled by 4-phases traffic signals.
|
Modifier and Type | Method and Description |
---|---|
Simulator |
getSimulator()
Get the simulator.
|
void |
setGreenLightDuration(double greenLightDuration)
Set the duration of the green signals
|
void |
setYellowLightDuration(double yellowLightDuration)
Set the duration of the yellow signals
|
getColumns, getDistanceBetween, getLanesPerRoad, getLaneWidth, getMedianSize, getRows, getSpeedLimit, getStopDistBeforeIntersection, getTrafficLevel, setLanesPerRoad, setNumOfColumns, setNumOfRows, setSpeedLimit, setStopDistBeforeIntersection, setTrafficLevel
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setStopDistBeforeIntersection, setTrafficLevel
public Approx4PhasesTrafficSignalSimSetup(BasicSimSetup basicSimSetup)
basicSimSetup
- the basic simulator setuppublic Approx4PhasesTrafficSignalSimSetup(int columns, int rows, double laneWidth, double speedLimit, int lanesPerRoad, double medianSize, double distanceBetween, double trafficLevel, double stopDistBeforeIntersection)
columns
- the number of columnsrows
- the number of rowslaneWidth
- the width of lanesspeedLimit
- the speed limitlanesPerRoad
- the number of lanes per roadmedianSize
- the median sizedistanceBetween
- the distance between intersectionstrafficLevel
- the traffic levelstopDistBeforeIntersection
- the stopping distance beforepublic void setGreenLightDuration(double greenLightDuration)
greenLightDuration
- the duration of the green signalspublic void setYellowLightDuration(double yellowLightDuration)
yellowLightDuration
- the duration of the yellow signalspublic Simulator getSimulator()
getSimulator
in interface SimSetup
getSimulator
in class BasicSimSetup
Copyright © 2013. All rights reserved.