PyANGKernel.GKControlPhase

class GKControlPhase

A control plan Phase in a node.

Details

A phase holds all the signal groups that will be green during a time period.

Usually the user will: - Create a new phase - Set the signals belonging to it ( addSignal ) - Set the phase period ( setFrom , setDuration ) - Add the phase to its control junction ( addPhase )

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 GKControlPhaseBeginCoord
class GKControlPhaseRecall
__init__()
addControlDetector(detec)
Parameters:

detecGKControlDetector

Return type:

bool

In actuated controls, adds a control detector created with createControlDetector to this phase. The object IS adopted.

addSignal(signal[, flashing=GKControlPhaseSignal.eNo])
Parameters:

Adds a signal to this phase, also indicating if when activated it will flash or it will be a continuous green

clone([addItToModel=true])
Parameters:

addItToModel – bool

Return type:

GKControlPhase

createControlDetector(netDetector)
Parameters:

netDetectorGKDetector

Return type:

GKControlDetector

In actuated controls, creates the set of control information for the specified detector. The user will set any additional parameter and then add it to this phase using the addControlDetector method.

Note that the object detector CANNOT be used in other phases.

findSignal(idSignal)
Parameters:

idSignal – int

Return type:

int

fixSignals(node)
Parameters:

nodeGKNode

After a full restore, try to match signals in this phase with signals in node if required.

getBeginCoord()
Return type:

GKControlPhaseBeginCoord

getControlDetectors()
Return type:

Dictionary with keys of type .GKDetector and values of type GKControlDetector.

Returns all the associated detectors in this phase.

getControlJunction()
Return type:

GKControlJunction

getDuration()
Return type:

float

Gets the phase duration.

getForceOff()
Return type:

float

getFrom()
Return type:

float

Gets the start time for this phase, between 0 and the cycle time.

getHold()
Return type:

bool

getIdBarrier()
Return type:

int

getIdRing()
Return type:

int

getInterphase()
Return type:

bool

Returns true if this phase is an interphase (all turns in red).

getIsDefault()
Return type:

bool

getMaxDuration()
Return type:

float

Gets the phase maximum duration, in seconds. Used only in adaptive and external control plans.

getMaximumInitial()
Return type:

float

In actuated controls, returns the Maximum Initial Green in seconds for this phase.

getMinDuration()
Return type:

float

Gets the phase minimum duration, in seconds. Used only in adaptive and external control plans and in fixed control plans with priority.

getMinimumGap()
Return type:

float

In actuated controls, returns the MinimumGap in seconds for this phase.

getPassageTime()
Return type:

float

In actuated controls, returns the Passage Time in seconds for this phase.

getPermissivePeriodFrom()
Return type:

float

getPermissivePeriodTo()
Return type:

float

getRecall()
Return type:

GKControlPhaseRecall

In actuated controls, returns the Recall for this phase (eNo, eMin, eMax or eCoord).

getRedToGreenYellowTimeDuration()
Return type:

float

Gets the phase red to green yellow time duration, in seconds. If a -1 is returned it means that the phase will use the red-to-green yellow time defined in the corresponding node control plan.

getSecondsActuation()
Return type:

float

In actuated controls, returns the Seconds per Actuation for this phase.

getSignals()
Return type:

.list of GKControlPhaseSignal

Returns all the signals in this phase.

getTimeBeforeReduce()
Return type:

float

In actuated controls, returns the Time Before Reduce in seconds for this phase.

getTimeToReduce()
Return type:

float

In actuated controls, returns the Time to Reduce in seconds for this phase.

getWeakId()
Return type:

int

getYellowTimeDuration()
Return type:

float

Gets the phase yellow time duration, from green to red state, in seconds. If a -1 is returned it means that the phase will use the yellow time, from green to red state, defined in the corresponding node control plan.

isFlashing(idSignal)
Parameters:

idSignal – int

Return type:

FlashingType

Returns true if the specified signal in this phase is set to flashing.

isUsingGapReduction()
Return type:

bool

isUsingVariableInitial()
Return type:

bool

__lt__(v)
Parameters:

vGKControlPhase

Return type:

bool

Compares phases using the ring and the from time ( getFrom )

__le__(v)
Parameters:

vGKControlPhase

Return type:

bool

Compares phases using the ring and the from time ( getFrom )

__gt__(v)
Parameters:

vGKControlPhase

Return type:

bool

Compares phases using the ring and the from time ( getFrom )

__ge__(v)
Parameters:

vGKControlPhase

Return type:

bool

Compares phases using the ring and the from time ( getFrom )

removeAllControlDetectors()

Removes all detectors from this phase. Neither the detectors nor the ControlDetectors information is deleted.

removeAllSignals()

Removes all signals from this phase. The signals are not deleted.

removeControlDetector(detec)
Parameters:

detecGKControlDetector

Removes a detector from this phase. Neither the detector nor the ControlDetector information is deleted.

removeSignal(idSignal)
Parameters:

idSignal – int

Removes a signal from this phase. The signal is not deleted.

removeUnknownSignals()
reread()
setBeginCoord(bc)
Parameters:

bcGKControlPhaseBeginCoord

setControlJunction(junc)
Parameters:

juncGKControlJunction

setDuration(d)
Parameters:

d – float

Sets the phase duration.

setFlashing(idSignal, flashing)
Parameters:

Sets the specified signal in this phase to flashing.

See also

isFlashing()

setForceOff(aForceOff)
Parameters:

aForceOff – float

setFrom(time)
Parameters:

time – float

Sets the start time for this phase, between 0 and the cycle time.

setHold(h)
Parameters:

h – bool

setIdBarrier(aIdBarrier)
Parameters:

aIdBarrier – int

setIdRing(aIdRing)
Parameters:

aIdRing – int

setInterphase(a)
Parameters:

a – bool

Marks this phase as an interphase (all turns in red).

setIsDefault(aIsDefault)
Parameters:

aIsDefault – bool

setMaxDuration(maxD)
Parameters:

maxD – float

Sets the phase maximum duration, in seconds. Used only in adaptive and external control plans.

setMaximumInitial(maxI)
Parameters:

maxI – float

In actuated controls, sets the Maximum Initial Green in seconds for this phase.

setMinDuration(minD)
Parameters:

minD – float

Sets the phase minimum duration, in seconds. Used only in adaptive and external control plans and in fixed control plans with priority.

setMinimumGap(minG)
Parameters:

minG – float

In actuated controls, sets the MinimumGap in seconds for this phase.

setPassageTime(passT)
Parameters:

passT – float

In actuated controls, sets the Passage Time in seconds for this phase.

setPermissivePeriodFrom(fperiod)
Parameters:

fperiod – float

setPermissivePeriodTo(tperiod)
Parameters:

tperiod – float

setRecall(r)
Parameters:

rGKControlPhaseRecall

In actuated controls, sets the Recall for this phase to: eNo, eMin, eMax or eCoord.

setRedToGreenYellowTimeDuration(aYellowTimeDuration)
Parameters:

aYellowTimeDuration – float

Sets the phase red to green yellow time duration, in seconds. When a -1 is set, the phase will use the red-to-green yellow time defined in the corresponding node control plan.

setSecondsActuation(secA)
Parameters:

secA – float

In actuated controls, sets the Seconds per Actuation for this phase.

setTimeBeforeReduce(timeBR)
Parameters:

timeBR – float

In actuated controls, sets the Time Before Reduce in seconds for this phase.

setTimeToReduce(timeTR)
Parameters:

timeTR – float

In actuated controls, sets the Time to Reduce in seconds for this phase.

setUsingGapReduction(b)
Parameters:

b – bool

setUsingVariableInitial(b)
Parameters:

b – bool

setWeakId(aid)
Parameters:

aid – int

setYellowTimeDuration(yellowD)
Parameters:

yellowD – float

Sets the phase yellow time duration, from green to red state, in seconds. When a -1 is set, the phase will use the yellow time, from green to red state, defined in the corresponding node control plan.

turningHasGreen(turning)
Parameters:

turningGKTurning

Return type:

bool

Returns true if this turn movement is allowed in this phase and false otherwise