PyANGKernel.GKLaneType¶
- class GKLaneType¶
A lane type holds information that can be aplied by lane. Currently only lane reservation is considered.
Details
A lane can be reserved for several vehicle types. When a lane is compulsory reserved, the vehicles than can use it must and will use it (unless the lane is blocked). When a lane is reserved optional, the vehicles that can use it will use it or not, depending of the traffic conditions. The rest of the vehicles cannot use the lane unless this lane occurs to be the only possible lane for a desired turn.
A lane can be reserved for trams (or any type of vehicle on rails). This type of reservation makes it impossible for the vehicle to get out of the lane even if the lane is blocked.
Synopsis¶
Methods¶
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class GKLaneTypeType¶
Lane Types: - None: no reservation. - eReservedOptional: the vehicles of a class can use or not the lane depending of the traffic conditions; vehicles of any other class cannot use the lane. - eReservedCompulsory: the vehicles of a class must use the lane no matter what the traffic conditions are, except when the lane is blocked; vehicles of any other class cannot use the lane. - eTram: the vehicles of a class must use the lane no matter what the traffic conditions are; vehicles of any other class cannot use the lane. The vehicle cannot move to another lane type even when the current one is blocked.
- __init__()¶
- canUse(v)¶
- Parameters:
v –
GKVehicleClass- Return type:
Returns true if this vehicle class can use this lane type.
Returns true if this vehicle can use this lane type.
Get the lane use for a vehicle. If the vehicle is present in different vehicle classes it will return the use for the first one defined.
- getTypeForVehicle(vehicle)
- Parameters:
vehicle –
GKVehicleClass- Return type:
Get the lane use for a vehicle class.
Returns true if this type includes a reserved type for at least one vehicle class.
Returns true if this type is reserved for the specified vehicle.
- removeAllTypesForVehicles()¶
Removes all associated vehicle classes.
- setIsConsideredInTwoLanesCarFollowingModel(consider)¶
- Parameters:
consider – bool
- setTypeForVehicle(vehicle, type)¶
- Parameters:
vehicle –
GKVehicleClasstype –
GKLaneTypeType
Set a lane use for a vehicle class.