Aimsun Next Scripting
22
|
Public Types | |
enum | GKControlPhaseBeginCoord { eGreen , eYellow , eRed } |
enum | GKControlPhaseRecall { eNo , eMin , eMax , eCoord } |
Public Member Functions | |
GKControlPhase () | |
void | setFrom (const float time) |
const float | getFrom () const |
void | setDuration (const float d) |
const float | getDuration () const |
void | setMinDuration (const float minD) |
const float | getMinDuration () const |
void | setMaxDuration (const float maxD) |
const float | getMaxDuration () const |
void | setYellowTimeDuration (const float yellowD) |
const float | getYellowTimeDuration () const |
void | setRedToGreenYellowTimeDuration (const float aYellowTimeDuration) |
float | getRedToGreenYellowTimeDuration () const |
void | setInterphase (const bool a) |
const bool | getInterphase () const |
void | addSignal (GKControlPlanSignal *signal, GKControlPhaseSignal::FlashingType flashing=GKControlPhaseSignal::eNo) |
void | removeSignal (uint idSignal) |
void | removeAllSignals () |
const QVector< GKControlPhaseSignal > & | getSignals () |
void | setFlashing (int idSignal, GKControlPhaseSignal::FlashingType flashing) |
GKControlPhaseSignal::FlashingType | isFlashing (int idSignal) const |
void | setRecall (const GKControlPhaseRecall r) |
const GKControlPhaseRecall | getRecall () const |
void | setPassageTime (const float passT) |
const float | getPassageTime () const |
void | setMaximumInitial (const float maxI) |
const float | getMaximumInitial () const |
void | setSecondsActuation (const float secA) |
const float | getSecondsActuation () const |
void | setTimeBeforeReduce (const float timeBR) |
const float | getTimeBeforeReduce () const |
void | setTimeToReduce (const float timeTR) |
const float | getTimeToReduce () const |
void | setMinimumGap (const float minG) |
const float | getMinimumGap () const |
bool | findSignal (uint idSignal) |
void | setControlJunction (GKControlJunction *junc) |
GKControlJunction * | getControlJunction () |
void | setPermissivePeriodFrom (const float fperiod) |
const float | getPermissivePeriodFrom () const |
void | setPermissivePeriodTo (const float tperiod) |
const float | getPermissivePeriodTo () const |
void | setForceOff (const float aForceOff) |
const float | getForceOff () const |
const GKControlPhaseBeginCoord | getBeginCoord () |
void | setBeginCoord (const GKControlPhaseBeginCoord bc) |
const bool | getHold () |
void | setHold (const bool h) |
bool | operator< (GKControlPhase &v) const |
bool | operator<= (GKControlPhase &v) const |
bool | operator> (GKControlPhase &v) const |
bool | operator>= (GKControlPhase &v) const |
void | setIdRing (const int aIdRing) |
const int | getIdRing () const |
void | setIdBarrier (const int aIdBarrier) |
const int | getIdBarrier () const |
void | setIsDefault (const bool aIsDefault) |
const bool | getIsDefault () const |
void | setWeakId (const uint aid) |
const uint | getWeakId () const |
bool | turningHasGreen (GKTurning *turning) |
bool | isUsingGapReduction () const |
void | setUsingGapReduction (bool b) |
bool | isUsingVariableInitial () const |
void | setUsingVariableInitial (bool b) |
GKControlDetector * | createControlDetector (GKDetector *netDetector) |
bool | addControlDetector (GKControlDetector *detec) |
void | removeControlDetector (const GKControlDetector *detec) |
void | removeAllControlDetectors () |
const QMap< GKDetector *, GKControlDetector * > & | getControlDetectors () |
A phase holds all the signal groups that will be green during a time period.
Usually the user will:
GKControlPhase::GKControlPhase | ( | ) |
bool GKControlPhase::addControlDetector | ( | GKControlDetector * | detec | ) |
Adds a control detector created with GKControlPhase::createControlDetector. The object is not adopted as it can be in other phases.
void GKControlPhase::addSignal | ( | GKControlPlanSignal * | signal, |
GKControlPhaseSignal::FlashingType | flashing = GKControlPhaseSignal::eNo |
||
) |
Adds a signal to this phase indicating if when activated it will flash or it will be a continuous green
GKControlDetector * GKControlPhase::createControlDetector | ( | GKDetector * | netDetector | ) |
Creates a new control detector. The user will set any additional parameter and then add it to this phase using the GKControlPhase::addControlDetector method.
Note that the same control detector can be used in other phases too.
bool GKControlPhase::findSignal | ( | uint | idSignal | ) |
const GKControlPhaseBeginCoord GKControlPhase::getBeginCoord | ( | ) |
const QMap< GKDetector *, GKControlDetector * > & GKControlPhase::getControlDetectors | ( | ) |
Returns all the associated detectors in this phase.
GKControlJunction * GKControlPhase::getControlJunction | ( | ) |
const float GKControlPhase::getDuration | ( | ) | const |
Gets the phase duration.
const float GKControlPhase::getForceOff | ( | ) | const |
const float GKControlPhase::getFrom | ( | ) | const |
Gets the start time for this phase, between 0 and the cycle time.
const bool GKControlPhase::getHold | ( | ) |
const int GKControlPhase::getIdBarrier | ( | ) | const |
const int GKControlPhase::getIdRing | ( | ) | const |
const bool GKControlPhase::getInterphase | ( | ) | const |
It is this phase as an interphase? (all turns in red)
const bool GKControlPhase::getIsDefault | ( | ) | const |
const float GKControlPhase::getMaxDuration | ( | ) | const |
Gets the phase maximum duration. Used only in adaptive and external control plans.
const float GKControlPhase::getMaximumInitial | ( | ) | const |
const float GKControlPhase::getMinDuration | ( | ) | const |
Gets the phase minimum duration. Used only in adaptive and external control plans.
const float GKControlPhase::getMinimumGap | ( | ) | const |
const float GKControlPhase::getPassageTime | ( | ) | const |
const float GKControlPhase::getPermissivePeriodFrom | ( | ) | const |
const float GKControlPhase::getPermissivePeriodTo | ( | ) | const |
const GKControlPhaseRecall GKControlPhase::getRecall | ( | ) | const |
float GKControlPhase::getRedToGreenYellowTimeDuration | ( | ) | const |
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.
const float GKControlPhase::getSecondsActuation | ( | ) | const |
const QVector< GKControlPhaseSignal > & GKControlPhase::getSignals | ( | ) |
Returns all the signals in this phase. Signals are not in the catalog so you have to use GKNode::getSignal to get the pointer to the GKControlPlanSignal
const float GKControlPhase::getTimeBeforeReduce | ( | ) | const |
const float GKControlPhase::getTimeToReduce | ( | ) | const |
const uint GKControlPhase::getWeakId | ( | ) | const |
const float GKControlPhase::getYellowTimeDuration | ( | ) | const |
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.
GKControlPhaseSignal::FlashingType GKControlPhase::isFlashing | ( | int | idSignal | ) | const |
bool GKControlPhase::isUsingGapReduction | ( | ) | const |
returns whether is using gap reduction or not
bool GKControlPhase::isUsingVariableInitial | ( | ) | const |
returns whether is using variable initial or not
bool GKControlPhase::operator< | ( | GKControlPhase & | v | ) | const |
Compares phases using the from time (GKControlPhase::getFrom)
bool GKControlPhase::operator<= | ( | GKControlPhase & | v | ) | const |
Compares phases using the from time (GKControlPhase::getFrom)
bool GKControlPhase::operator> | ( | GKControlPhase & | v | ) | const |
Compares phases using the from time (GKControlPhase::getFrom)
bool GKControlPhase::operator>= | ( | GKControlPhase & | v | ) | const |
Compares phases using the from time (GKControlPhase::getFrom)
void GKControlPhase::removeAllControlDetectors | ( | ) |
Removes all detectors from this phase. Objects are not deleted.
void GKControlPhase::removeAllSignals | ( | ) |
Removes all signals from this phase. The signals are not deleted.
void GKControlPhase::removeControlDetector | ( | const GKControlDetector * | detec | ) |
Removes a detector from this phase. The object is not deleted.
void GKControlPhase::removeSignal | ( | uint | idSignal | ) |
Removes a signal from this phase. The signal is not deleted.
void GKControlPhase::setBeginCoord | ( | const GKControlPhaseBeginCoord | bc | ) |
void GKControlPhase::setControlJunction | ( | GKControlJunction * | junc | ) |
void GKControlPhase::setDuration | ( | const float | d | ) |
Sets the phase duration.
void GKControlPhase::setFlashing | ( | int | idSignal, |
GKControlPhaseSignal::FlashingType | flashing | ||
) |
void GKControlPhase::setForceOff | ( | const float | aForceOff | ) |
void GKControlPhase::setFrom | ( | const float | time | ) |
Sets the start time for this phase, between 0 and the cycle time.
void GKControlPhase::setHold | ( | const bool | h | ) |
void GKControlPhase::setIdBarrier | ( | const int | aIdBarrier | ) |
void GKControlPhase::setIdRing | ( | const int | aIdRing | ) |
void GKControlPhase::setInterphase | ( | const bool | a | ) |
Marks this phase as an interphase (all turns in red)
void GKControlPhase::setIsDefault | ( | const bool | aIsDefault | ) |
void GKControlPhase::setMaxDuration | ( | const float | maxD | ) |
Sets the phase maximum duration. Used only in adaptive and external control plans.
void GKControlPhase::setMaximumInitial | ( | const float | maxI | ) |
void GKControlPhase::setMinDuration | ( | const float | minD | ) |
Sets the phase minimum duration. Used only in adaptive and external control plans.
void GKControlPhase::setMinimumGap | ( | const float | minG | ) |
void GKControlPhase::setPassageTime | ( | const float | passT | ) |
void GKControlPhase::setPermissivePeriodFrom | ( | const float | fperiod | ) |
void GKControlPhase::setPermissivePeriodTo | ( | const float | tperiod | ) |
void GKControlPhase::setRecall | ( | const GKControlPhaseRecall | r | ) |
void GKControlPhase::setRedToGreenYellowTimeDuration | ( | const float | aYellowTimeDuration | ) |
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.
void GKControlPhase::setSecondsActuation | ( | const float | secA | ) |
void GKControlPhase::setTimeBeforeReduce | ( | const float | timeBR | ) |
void GKControlPhase::setTimeToReduce | ( | const float | timeTR | ) |
void GKControlPhase::setUsingGapReduction | ( | bool | b | ) |
sets using gap reduction option
void GKControlPhase::setUsingVariableInitial | ( | bool | b | ) |
sets using variable initial option
void GKControlPhase::setWeakId | ( | const uint | aid | ) |
void GKControlPhase::setYellowTimeDuration | ( | const float | yellowD | ) |
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.
bool GKControlPhase::turningHasGreen | ( | GKTurning * | turning | ) |
Returns true if this turn movement is allowed in this phase and false otherwise.