Package com.anylogic.engine.markup
- All Superinterfaces:
RoadBasicDataSource
,java.io.Serializable
public interface ParkingLotDataSource extends RoadBasicDataSource
Agent |
getCarOnSpace(int spaceIndex) |
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
|
Modifier and Type | Method | Description |
---|
getCars, nCars
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()
-
How can we improve this article?
-