aim4.sim.setup
Class BasicSimSetup

java.lang.Object
  extended by aim4.sim.setup.BasicSimSetup
All Implemented Interfaces:
SimSetup
Direct Known Subclasses:
Approx4PhasesTrafficSignalSimSetup, ApproxNPhasesTrafficSignalSimSetup, ApproxSimpleTrafficSignalSimSetup, ApproxStopSignSimSetup, AutoDriverOnlySimSetup

public class BasicSimSetup
extends Object
implements SimSetup

The basic simulator setup


Field Summary
protected  double distanceBetween
          The distance between intersection
protected  int lanesPerRoad
          The number of lanes per road
protected  double laneWidth
          The width of lanes
protected  double medianSize
          The width of the area between the opposite directions of a road
protected  int numOfColumns
          The number of columns
protected  int numOfRows
          The number of rows
protected  double speedLimit
          The speed limit of the roads
protected  double stopDistBeforeIntersection
          The stopping distance before intersection
protected  double trafficLevel
          The traffic level
 
Constructor Summary
BasicSimSetup(BasicSimSetup basicSimSetup)
          Create a copy of a given basic simulator setup.
BasicSimSetup(int columns, int rows, double laneWidth, double speedLimit, int lanesPerRoad, double medianSize, double distanceBetween, double trafficLevel, double stopDistBeforeIntersection)
          Create a basic simulator setup.
 
Method Summary
 int getColumns()
          Get the number of columns.
 double getDistanceBetween()
          Get the distance between intersections.
 int getLanesPerRoad()
          Get the number of lanes per road.
 double getLaneWidth()
          Get the width of lanes.
 double getMedianSize()
          Get the width of the area between the opposite directions of a road.
 int getRows()
          Get the number of rows.
 Simulator getSimulator()
          Get the simulator.
 double getSpeedLimit()
          Get the speed limit of the roads.
 double getStopDistBeforeIntersection()
          Get the stopping distance before intersection.
 double getTrafficLevel()
          Get the traffic level.
 void setLanesPerRoad(int lanesPerRoad)
          Set the number of lanes per road.
 void setNumOfColumns(int numOfColumns)
          Set the number of columns.
 void setNumOfRows(int numOfRows)
          Set the number of rows.
 void setSpeedLimit(double speedLimit)
          Set the speed limit.
 void setStopDistBeforeIntersection(double stopDistBeforeIntersection)
          Set the stopping distance before intersection.
 void setTrafficLevel(double trafficLevel)
          Set the traffic level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numOfColumns

protected int numOfColumns
The number of columns


numOfRows

protected int numOfRows
The number of rows


laneWidth

protected double laneWidth
The width of lanes


speedLimit

protected double speedLimit
The speed limit of the roads


lanesPerRoad

protected int lanesPerRoad
The number of lanes per road


medianSize

protected double medianSize
The width of the area between the opposite directions of a road


distanceBetween

protected double distanceBetween
The distance between intersection


trafficLevel

protected double trafficLevel
The traffic level


stopDistBeforeIntersection

protected double stopDistBeforeIntersection
The stopping distance before intersection

Constructor Detail

BasicSimSetup

public BasicSimSetup(BasicSimSetup basicSimSetup)
Create a copy of a given basic simulator setup.

Parameters:
basicSimSetup - a basic simulator setup

BasicSimSetup

public BasicSimSetup(int columns,
                     int rows,
                     double laneWidth,
                     double speedLimit,
                     int lanesPerRoad,
                     double medianSize,
                     double distanceBetween,
                     double trafficLevel,
                     double stopDistBeforeIntersection)
Create a basic simulator setup.

Parameters:
columns - the number of columns
rows - the number of rows
laneWidth - the width of lanes
speedLimit - the speed limit of the roads
lanesPerRoad - the number of lanes per road
medianSize - the width of the area between the opposite directions of a road
distanceBetween - the distance between intersections
trafficLevel - the traffic level
stopDistBeforeIntersection - the stopping distance before intersection
Method Detail

getSimulator

public Simulator getSimulator()
Get the simulator.

Specified by:
getSimulator in interface SimSetup
Returns:
the simulator

getColumns

public int getColumns()
Get the number of columns.

Returns:
the number of columns

getRows

public int getRows()
Get the number of rows.

Returns:
the number of rows

getLaneWidth

public double getLaneWidth()
Get the width of lanes.

Returns:
the width of lanes

getSpeedLimit

public double getSpeedLimit()
Get the speed limit of the roads.

Returns:
the speed limit of the roads.

getLanesPerRoad

public int getLanesPerRoad()
Get the number of lanes per road.

Returns:
the number of lanes per road

getMedianSize

public double getMedianSize()
Get the width of the area between the opposite directions of a road.

Returns:
the width of the area between the opposite directions of a road

getDistanceBetween

public double getDistanceBetween()
Get the distance between intersections.

Returns:
the distance between intersections

getTrafficLevel

public double getTrafficLevel()
Get the traffic level.

Returns:
the traffic level

getStopDistBeforeIntersection

public double getStopDistBeforeIntersection()
Get the stopping distance before intersection.

Returns:
the stopping distance before intersection

setTrafficLevel

public void setTrafficLevel(double trafficLevel)
Set the traffic level.

Specified by:
setTrafficLevel in interface SimSetup
Parameters:
trafficLevel - the traffic level

setSpeedLimit

public void setSpeedLimit(double speedLimit)
Set the speed limit.

Parameters:
speedLimit - the speed limit

setStopDistBeforeIntersection

public void setStopDistBeforeIntersection(double stopDistBeforeIntersection)
Set the stopping distance before intersection.

Specified by:
setStopDistBeforeIntersection in interface SimSetup
Parameters:
stopDistBeforeIntersection - the stopping distance

setNumOfColumns

public void setNumOfColumns(int numOfColumns)
Set the number of columns.

Parameters:
numOfColumns - the number of columns

setNumOfRows

public void setNumOfRows(int numOfRows)
Set the number of rows.

Parameters:
numOfRows - the number of rows

setLanesPerRoad

public void setLanesPerRoad(int lanesPerRoad)
Set the number of lanes per road.

Parameters:
lanesPerRoad - the number of lanes per road


Copyright © 2011. All Rights Reserved.