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 | getParkingSpaceIndex |
Returns the index of specified car in the parking lot.
|
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,..)
int getParkingSpaceIndex(Agent car)
Returns the index of specified car in the parking lot.
Returns -1 if there is no specified car in the lot.
- Returns:
- parking space index for specified car or -1
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()