PyDetectionPattern.GKDetectionPatternEvent

class GKDetectionPatternEvent

Inherited by: OCITDetectionPatternEvent

Synopsis

Methods

Virtual 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

Detailed Description

A detection event that will be used by the simulator to simulate a vehicle passing a detector.

It has: - the detector to activate (and later on deactivate) - the activation time (relative to the simulation initial time) - the duration of the activation - the vehicle type for the detection

Based on the detection capabilities is possible to specify the data to be detected: - Speed: Can detect speed - Length: Can detect density - Transit Line: Can detect an equipped vehicle

class OccupancyMode
__init__()
clone()
Return type:

GKDetectionPatternEvent

getDetector()
Return type:

GKDetector

Detector to activate/deactivate.

getDuration()
Return type:

GKTimeDuration

For how long it is active

getLength()
Return type:

float

Length detected.

getOccupancyMode()
Return type:

OccupancyMode

getPTLine()
Return type:

GKPublicLine

Transit Line detected.

getSpeed()
Return type:

float

Speed detected.

getVehicle()
Return type:

GKVehicle

Vehicle type detected.

getWhen()
Return type:

GKTimeDuration

When it is activated. Relative time from the simulation initial time.

isValid()
Return type:

bool

__eq__(item)
Parameters:

itemGKDetectionPatternEvent

Return type:

bool

setDetector(dect)
Parameters:

dectGKDetector

Detector to activate/deactivate.

setDuration(time)
Parameters:

timeGKTimeDuration

For how long it is active

setLength(l)
Parameters:

l – float

Length detected.

setModel(amodel)
Parameters:

amodelGKModel

Set the model where this event is

setOccupancyMode(which)
Parameters:

whichOccupancyMode

setPTLine(line)
Parameters:

lineGKPublicLine

Transit Line detected.

setSpeed(s)
Parameters:

s – float

Speed detected.

setVehicle(veh)
Parameters:

vehGKVehicle

Vehicle type detected. It cannot be left unassigned

setWhen(time)
Parameters:

timeGKTimeDuration

When it is activated. Relative time from the simulation initial time.