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¶
def
__init__()def
addSignal()def
clone()def
findSignal()def
fixSignals()def
getBeginCoord()def
getDuration()def
getForceOff()def
getFrom()def
getHold()def
getIdBarrier()def
getIdRing()def
getInterphase()def
getIsDefault()def
getMaxDuration()def
getMinDuration()def
getMinimumGap()def
getPassageTime()def
getRecall()def
getSignals()def
getWeakId()def
isFlashing()def
__lt__()def
__le__()def
__gt__()def
__ge__()def
removeSignal()def
reread()def
setBeginCoord()def
setDuration()def
setFlashing()def
setForceOff()def
setFrom()def
setHold()def
setIdBarrier()def
setIdRing()def
setInterphase()def
setIsDefault()def
setMaxDuration()def
setMinDuration()def
setMinimumGap()def
setPassageTime()def
setRecall()def
setWeakId()
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:
detec –
GKControlDetector- Return type:
In actuated controls, adds a control detector created with
createControlDetectorto this phase. The object IS adopted.- addSignal(signal[, flashing=GKControlPhaseSignal.eNo])¶
- Parameters:
signal –
GKControlPlanSignalflashing –
FlashingType
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:
- createControlDetector(netDetector)¶
- Parameters:
netDetector –
GKDetector- Return type:
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
addControlDetectormethod.Note that the object detector CANNOT be used in other phases.
After a full restore, try to match signals in this phase with signals in node if required.
- getBeginCoord()¶
- Return type:
- 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:
Gets the phase duration.
Gets the start time for this phase, between 0 and the cycle time.
Returns true if this phase is an interphase (all turns in red).
Gets the phase maximum duration, in seconds. Used only in adaptive and external control plans.
In actuated controls, returns the Maximum Initial Green in seconds for this phase.
Gets the phase minimum duration, in seconds. Used only in adaptive and external control plans and in fixed control plans with priority.
In actuated controls, returns the MinimumGap in seconds for this phase.
In actuated controls, returns the Passage Time in seconds for this phase.
- getRecall()¶
- Return type:
In actuated controls, returns the Recall for this phase (eNo, eMin, eMax or eCoord).
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.
In actuated controls, returns the Seconds per Actuation for this phase.
- getSignals()¶
- Return type:
.list of GKControlPhaseSignal
Returns all the signals in this phase.
In actuated controls, returns the Time Before Reduce in seconds for this phase.
In actuated controls, returns the Time to Reduce in seconds for this phase.
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:
Returns true if the specified signal in this phase is set to flashing.
- __lt__(v)¶
- Parameters:
v –
GKControlPhase- Return type:
Compares phases using the ring and the from time (
getFrom)- __le__(v)¶
- Parameters:
v –
GKControlPhase- Return type:
Compares phases using the ring and the from time (
getFrom)- __gt__(v)¶
- Parameters:
v –
GKControlPhase- Return type:
Compares phases using the ring and the from time (
getFrom)- __ge__(v)¶
- Parameters:
v –
GKControlPhase- Return type:
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:
detec –
GKControlDetector
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:
- setControlJunction(junc)¶
- Parameters:
junc –
GKControlJunction
- setDuration(d)¶
- Parameters:
d – float
Sets the phase duration.
- setFlashing(idSignal, flashing)¶
- Parameters:
idSignal – int
flashing –
FlashingType
Sets the specified signal in this phase to flashing.
See also
- 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:
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.
Returns true if this turn movement is allowed in this phase and false otherwise