Package com.anylogic.engine.markup
- All Superinterfaces:
RoadBasicDataSource
,Serializable
public interface ParkingLotDataSource extends RoadBasicDataSource
Modifier and Type | Method | Description |
---|---|---|
Agent | getCarOnSpace |
Returns car located in the parking space with the given index,
or
null if this space is free |
int[] | getFreeSpaceIndexes() |
Returns array of indexes of free spaces
|
int | nFree() |
Returns the number of free spaces in this parking lot
|
int | randomFreeSpaceIndex() |
Returns the index of randomly chosen free parking space
|
int nFree()
Returns the number of free spaces in this parking lot
- Returns:
- the number of free spaces
int randomFreeSpaceIndex()
Returns the index of randomly chosen free parking space
- Returns:
- free parking space index (0, 1, 2,..)
Agent getCarOnSpace(int spaceIndex)
Returns car located in the parking space with the given index,
or
null
if this space is free- Parameters:
spaceIndex
- index of parking space- Returns:
- agent (car) or
null
int[] getFreeSpaceIndexes()
Returns array of indexes of free spaces
- Returns:
- ordered array of indexes of free spaces (0-based)
- See Also:
-
randomFreeSpaceIndex()