|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object aim4.map.GridMap
public class GridMap
The grid layout map.
Constructor Summary | |
---|---|
GridMap(double initTime,
int columns,
int rows,
double laneWidth,
double speedLimit,
int lanesPerRoad,
double medianSize,
double distanceBetween)
Create a grid map. |
Method Summary | |
---|---|
int |
getColumns()
Get the number of columns in this grid layout. |
List<DataCollectionLine> |
getDataCollectionLines()
Get the list of data collection line. |
List<Road> |
getDestinationRoads()
Get the Roads that exit this Layout. |
Rectangle2D |
getDimensions()
Get the dimensions of this Layout, in Rectangle form. |
List<Road> |
getHorizontalRoads()
Get the set of horizontal roads. |
List<SpawnPoint> |
getHorizontalSpawnPoints()
Get the list of horizontal spawn points. |
Registry<IntersectionManager> |
getImRegistry()
Get the intersection manager registry. |
List<IntersectionManager> |
getIntersectionManagers()
Get the IntersectionManagers that are part of this Layout. |
Registry<Lane> |
getLaneRegistry()
Get the lane registry. |
IntersectionManager |
getManager(int column,
int row)
Get the intersection manager of a particular intersection. |
double |
getMaximumSpeedLimit()
Get the maximum speed limit of any Road in the Layout. |
Road |
getRoad(int laneID)
Given a Lane ID number, get the Road of which that Lane is a part. |
Road |
getRoad(Lane lane)
Given a Lane, get the Road of which that Lane is a part. |
List<Road> |
getRoads()
Get the Roads that are part of this Layout. |
List<Road> |
getRoads(int column,
int row)
Get the list of all roads that enter a particular intersection. |
int |
getRows()
Get the number of rows in this grid layout. |
List<SpawnPoint> |
getSpawnPoints()
Get the list of spawn points. |
List<Road> |
getVerticalRoads()
Get the set of vertical roads. |
List<SpawnPoint> |
getVerticalSpawnPoints()
Get the list of vertical spawn points. |
void |
printDataCollectionLinesData(String outFileName)
Print the data collected in data collection lines to the given file |
void |
removeAllManagers()
Remove managers in all intersections. |
void |
setManager(int column,
int row,
IntersectionManager im)
Set the intersection manager of a particular intersection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridMap(double initTime, int columns, int rows, double laneWidth, double speedLimit, int lanesPerRoad, double medianSize, double distanceBetween)
initTime
- the initial timecolumns
- the number of columnsrows
- the number of rowslaneWidth
- the lane widthspeedLimit
- the speed limitlanesPerRoad
- the number of lanes per roadmedianSize
- the width of the area between the roads in opposite
directiondistanceBetween
- the distance between the adjacent intersectionsMethod Detail |
---|
public List<Road> getRoads()
getRoads
in interface BasicMap
public List<Road> getDestinationRoads()
getDestinationRoads
in interface BasicMap
public Rectangle2D getDimensions()
getDimensions
in interface BasicMap
public double getMaximumSpeedLimit()
getMaximumSpeedLimit
in interface BasicMap
public List<IntersectionManager> getIntersectionManagers()
getIntersectionManagers
in interface BasicMap
public List<DataCollectionLine> getDataCollectionLines()
getDataCollectionLines
in interface BasicMap
public List<SpawnPoint> getSpawnPoints()
getSpawnPoints
in interface BasicMap
public List<SpawnPoint> getHorizontalSpawnPoints()
public List<SpawnPoint> getVerticalSpawnPoints()
public int getRows()
public int getColumns()
public List<Road> getRoads(int column, int row)
column
- the column of the intersectionrow
- the row of the intersection
public List<Road> getHorizontalRoads()
public List<Road> getVerticalRoads()
public Registry<IntersectionManager> getImRegistry()
getImRegistry
in interface BasicMap
public Registry<Lane> getLaneRegistry()
getLaneRegistry
in interface BasicMap
public Road getRoad(Lane lane)
getRoad
in interface BasicMap
lane
- the Lane for which to get the enclosing Road
public Road getRoad(int laneID)
getRoad
in interface BasicMap
laneID
- the ID of the Lane for which to get the enclosing Road
public IntersectionManager getManager(int column, int row)
column
- the column of the intersectionrow
- the row of the intersectionpublic void setManager(int column, int row, IntersectionManager im)
setManager
in interface BasicMap
column
- the column of the intersectionrow
- the row of the intersectionim
- the intersection managerpublic void removeAllManagers()
public void printDataCollectionLinesData(String outFileName)
printDataCollectionLinesData
in interface BasicMap
outFileName
- the name of the file to which the data are outputted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |