aim4.sim.setup
Class ApproxSimpleTrafficSignalSimSetup

java.lang.Object
  extended by aim4.sim.setup.BasicSimSetup
      extended by aim4.sim.setup.ApproxSimpleTrafficSignalSimSetup
All Implemented Interfaces:
SimSetup

public class ApproxSimpleTrafficSignalSimSetup
extends BasicSimSetup
implements SimSetup

The setup for the simulator in which the intersections are controlled by stop signs.


Field Summary
 
Fields inherited from class aim4.sim.setup.BasicSimSetup
distanceBetween, lanesPerRoad, laneWidth, medianSize, numOfColumns, numOfRows, speedLimit, stopDistBeforeIntersection, trafficLevel
 
Constructor Summary
ApproxSimpleTrafficSignalSimSetup(BasicSimSetup basicSimSetup)
          Create the setup for the simulator in which the intersections are controlled by stop signs.
ApproxSimpleTrafficSignalSimSetup(int columns, int rows, double laneWidth, double speedLimit, int lanesPerRoad, double medianSize, double distanceBetween, double trafficLevel, double stopDistBeforeIntersection)
          Create the setup for the simulator in which the intersections are controlled by stop signs.
 
Method Summary
 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
 
Methods inherited from class aim4.sim.setup.BasicSimSetup
getColumns, getDistanceBetween, getLanesPerRoad, getLaneWidth, getMedianSize, getRows, getSpeedLimit, getStopDistBeforeIntersection, getTrafficLevel, setLanesPerRoad, setNumOfColumns, setNumOfRows, setSpeedLimit, setStopDistBeforeIntersection, setTrafficLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface aim4.sim.setup.SimSetup
setStopDistBeforeIntersection, setTrafficLevel
 

Constructor Detail

ApproxSimpleTrafficSignalSimSetup

public ApproxSimpleTrafficSignalSimSetup(BasicSimSetup basicSimSetup)
Create the setup for the simulator in which the intersections are controlled by stop signs.

Parameters:
basicSimSetup - the basic simulator setup

ApproxSimpleTrafficSignalSimSetup

public ApproxSimpleTrafficSignalSimSetup(int columns,
                                         int rows,
                                         double laneWidth,
                                         double speedLimit,
                                         int lanesPerRoad,
                                         double medianSize,
                                         double distanceBetween,
                                         double trafficLevel,
                                         double stopDistBeforeIntersection)
Create the setup for the simulator in which the intersections are controlled by stop signs.

Parameters:
columns - the number of columns
rows - the number of rows
laneWidth - the width of lanes
speedLimit - the speed limit
lanesPerRoad - the number of lanes per road
medianSize - the median size
distanceBetween - the distance between intersections
trafficLevel - the traffic level
stopDistBeforeIntersection - the stopping distance before
Method Detail

setGreenLightDuration

public void setGreenLightDuration(double greenLightDuration)
Set the duration of the green signals

Parameters:
greenLightDuration - the duration of the green signals

setYellowLightDuration

public void setYellowLightDuration(double yellowLightDuration)
Set the duration of the yellow signals

Parameters:
yellowLightDuration - the duration of the yellow signals

getSimulator

public Simulator getSimulator()
Get the simulator.

Specified by:
getSimulator in interface SimSetup
Overrides:
getSimulator in class BasicSimSetup
Returns:
the simulator


Copyright © 2011. All Rights Reserved.