Interface ICarParkingLayer
The
ICarParkingLayer
capsules the access to all
CarParkingSpace
s.
Assembly: SOHCarModel.dll
Syntax
public interface ICarParkingLayer : IVectorLayer<CarParkingSpace>, IModalLayer, ILayer
Methods
CreateOwnCarNear(Position, Double, String, String)
Creates a car on a parking space within given radius. Takes closest parking space if radius is smaller/eqal zero.
Declaration
Car CreateOwnCarNear(Position position, double radiusInM = null, string keyAttribute = "type", string type = "Golf")
Parameters
Type |
Name |
Description |
Position |
position |
Where the car is about to be placed |
System.Double |
radiusInM |
Limits the distance to the position. |
System.String |
keyAttribute |
Identifies the attribute that describes the car type. |
System.String |
type |
Determines the car type. |
Returns
Type |
Description |
Car |
An initialized car on a parking space. |
Nearest(Position, Boolean)
Tries to find the nearest
CarParkingSpace
for given parameters.
Declaration
CarParkingSpace Nearest(Position position, bool freeCapacity = true)
Parameters
Type |
Name |
Description |
Position |
position |
Start point to search by range. |
System.Boolean |
freeCapacity |
Only finds parking spots that are free. |
Returns
Type |
Description |
CarParkingSpace |
The corresponding CarParkingSpace if one is found, null otherwise. |
UpdateOccupancy(Double, Int32)
Occupies a percentage of parking spaces.
Declaration
void UpdateOccupancy(double percent, int carCount = 0)
Parameters
Type |
Name |
Description |
System.Double |
percent |
Defines how many parking spaces are occupied, value between 0.0 and 1.0. |
System.Int32 |
carCount |
How many cars are in the scenario, this amount will be integrated, because these cars
also occupy spaces.
|