PyANGKernel.GKBusPreemption

class GKBusPreemption

Priority information in a control plan for a node

Details

Priority information in a control plan for a node ( GKControlJunction ) to foresee the arrival of a Transit vehicle in order to anticipate the phase that gives it the right of way. It takes into account the following elements: - Transit Lines that activate a priority request - Detectors that determine the position where the priority request is activated and finished. - Phase, or phases in a multi-ring (one per ring), that is activated to give the priority.

If there are several phases in the same node that could receive priority by request, a different Priority Set must be defined for each one.

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 GKBusPreemptionType

Defines two types of priority to apply: Serve All (eAllPhases) or Alternative (eAlternative). Serve All serves all the remaining phases between the current green phase and the dwell phase with their minimum green time. The Alternative serves the dwell phase as soon as possible.

__init__()
addDetectorPriorityEnd(detector)
Parameters:

detectorGKDetector

Return type:

bool

Adds a detector to the list of detectors that end the priority

addDetectorPriorityRequest(detector)
Parameters:

detectorGKDetector

Return type:

bool

Adds a detector to the list of detectors to request priority.

addDwellPhase(idPhase)
Parameters:

idPhaseGKControlPhase

Return type:

bool

Adds a dwell phase, that is a phase that gives right of way to the emitted priority request, to the priority structure. In a multiring control plan one phase per ring (all in the same barrier) should be added. In a single ring just one dwell phase should be defined.

addPTLine(PTline)
Parameters:

PTlineGKPublicLine

Return type:

bool

Adds a Transit Line that will activate a priority request for the dwell phase.

getDelayTime()
Return type:

float

Gets the Delay Time that is the number of seconds defined to delay the start of the priority timing once a vehicle that activated the priority has been detected.

getDetectorPriorityEnd()
Return type:

.list of GKDetector

Returns the list of detectors that end the priority

getDetectorPriorityRequest()
Return type:

.list of GKDetector

Returns the list of detectors to request priority

getDwellPhases()
Return type:

.list of GKControlPhase

Returns the list of dwell phases defined for this priority. In a multiring control plan there should be one phase per ring (all in the same barrier). In a single ring there should be just one dwell phase.

getInhibitTime()
Return type:

float

Gets the inhibit time, that is the duration of the interval while the activation of any phase that is not the requested priority phase is prevented. This interval starts at the beginning of the request, and during this interval, calls from other phases are not taken into account.

getMaximumDwellGreen()
Return type:

float

Gets the maximum duration of the Dwell phase

getMinimumDwellGreen()
Return type:

float

Gets the minimum duration of the Dwell phase

getPTLines()
Return type:

.list of GKPublicLine

Gets the list of Transit Lines that will activate a priority request for the dwell phase.

getPreemptionName()
Return type:

str

Gets the name of the priority.

getReserveTime()
Return type:

float

Gets the reserve time, that is the time during which any other priority request is prevented when one has just been completed. This is used to prevent frequent priority services.

getType()
Return type:

GKBusPreemptionType

Gets the type of priority set to be applied: Serve All ( eAllPhases ) or Alternative ( eAlternative ). Serve All serves all the remaining phases between the current green phase and the dwell phase with their minimum green time. The Alternative serves the dwell phase as soon as possible.

removeDetectorPriorityEnd()

Clears the list of detectors that end the priority

removeDetectorPriorityEnd(detector)
Parameters:

detectorGKDetector

Return type:

bool

Removes a detector from the list of detectors that end the priority

removeDetectorPriorityRequest()

Clears the list of detectors to request priority

removeDetectorPriorityRequest(detector)
Parameters:

detectorGKDetector

Return type:

bool

Removes a detector from the list of detectors to request priority

removeDwellPhase(idPhase)
Parameters:

idPhaseGKControlPhase

Return type:

bool

Removes a dwell phase from the priority structure

removeDwellPhases()

Removes all dwell phases defined for this priority.

removePTLine(PTline)
Parameters:

PTlineGKPublicLine

Return type:

bool

Removes a Transit Line from the list of lines that activate a priority request for the dwell phase.

removePTLines()

Removes all Transit Lines from list of lines that will activate a priority request for the dwell phase.

setDelayTime(adelayTime)
Parameters:

adelayTime – float

Sets the Delay Time, that is the number of seconds to delay the start of the priority timing once a vehicle that activated the priority has been detected.

setInhibitTime(aInhibitTime)
Parameters:

aInhibitTime – float

Sets the Inhibit Time, that is the duration of the interval while the activation of any phase that is not the requested priority phase is prevented. This interval starts at the beginning of the request, and during this interval, calls from other phases are not taken into account.

setMaximumDwellGreen(maxDwellGreen)
Parameters:

maxDwellGreen – float

Sets the maximum duration of the Dwell phase

setMinimumDwellGreen(minDwellGreen)
Parameters:

minDwellGreen – float

Sets the minimum duration of the Dwell phase.

setPreemptionName(name)
Parameters:

name – str

Sets the name of the priority.

setReserveTime(areserveTime)
Parameters:

areserveTime – float

Sets the reserve time, that is the time during which any other priority request is prevented when one has just been completed. This is used to prevent frequent priority services.

setType(atype)
Parameters:

atypeGKBusPreemptionType

It sets the type of priority to apply: Serve All ( eAllPhases ) or Alternative ( eAlternative ). Serve All serves all the remaining phases between the current green phase and the dwell phase with their minimum green time. The Alternative serves the dwell phase as soon as possible.