|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaim4.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 intersections| Method Detail |
|---|
public List<Road> getRoads()
getRoads in interface BasicMappublic List<Road> getDestinationRoads()
getDestinationRoads in interface BasicMappublic Rectangle2D getDimensions()
getDimensions in interface BasicMappublic double getMaximumSpeedLimit()
getMaximumSpeedLimit in interface BasicMappublic List<IntersectionManager> getIntersectionManagers()
getIntersectionManagers in interface BasicMappublic List<DataCollectionLine> getDataCollectionLines()
getDataCollectionLines in interface BasicMappublic List<SpawnPoint> getSpawnPoints()
getSpawnPoints in interface BasicMappublic 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 BasicMappublic Registry<Lane> getLaneRegistry()
getLaneRegistry in interface BasicMappublic Road getRoad(Lane lane)
getRoad in interface BasicMaplane - the Lane for which to get the enclosing Road
public Road getRoad(int laneID)
getRoad in interface BasicMaplaneID - 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 intersection
public void setManager(int column,
int row,
IntersectionManager im)
setManager in interface BasicMapcolumn - the column of the intersectionrow - the row of the intersectionim - the intersection managerpublic void removeAllManagers()
public void printDataCollectionLinesData(String outFileName)
printDataCollectionLinesData in interface BasicMapoutFileName - 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 | |||||||||