Aimsun Next Scripting: GKControlPhase Class Reference
Aimsun Next Scripting  22
Public Types | Public Member Functions | List of all members
GKControlPhase Class Reference

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)
 
GKControlJunctiongetControlJunction ()
 
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)
 
GKControlDetectorcreateControlDetector (GKDetector *netDetector)
 
bool addControlDetector (GKControlDetector *detec)
 
void removeControlDetector (const GKControlDetector *detec)
 
void removeAllControlDetectors ()
 
const QMap< GKDetector *, GKControlDetector * > & getControlDetectors ()
 

Detailed Description

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

Usually the user will:

Member Enumeration Documentation

◆ GKControlPhaseBeginCoord

Enumerator
eGreen 
eYellow 
eRed 

◆ GKControlPhaseRecall

Enumerator
eNo 
eMin 
eMax 
eCoord 

Constructor & Destructor Documentation

◆ GKControlPhase()

GKControlPhase::GKControlPhase ( )

Member Function Documentation

◆ addControlDetector()

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.

◆ addSignal()

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

◆ createControlDetector()

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.

◆ findSignal()

bool GKControlPhase::findSignal ( uint  idSignal)

◆ getBeginCoord()

const GKControlPhaseBeginCoord GKControlPhase::getBeginCoord ( )

◆ getControlDetectors()

const QMap< GKDetector *, GKControlDetector * > & GKControlPhase::getControlDetectors ( )

Returns all the associated detectors in this phase.

◆ getControlJunction()

GKControlJunction * GKControlPhase::getControlJunction ( )

◆ getDuration()

const float GKControlPhase::getDuration ( ) const

Gets the phase duration.

◆ getForceOff()

const float GKControlPhase::getForceOff ( ) const

◆ getFrom()

const float GKControlPhase::getFrom ( ) const

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

◆ getHold()

const bool GKControlPhase::getHold ( )

◆ getIdBarrier()

const int GKControlPhase::getIdBarrier ( ) const

◆ getIdRing()

const int GKControlPhase::getIdRing ( ) const

◆ getInterphase()

const bool GKControlPhase::getInterphase ( ) const

It is this phase as an interphase? (all turns in red)

◆ getIsDefault()

const bool GKControlPhase::getIsDefault ( ) const

◆ getMaxDuration()

const float GKControlPhase::getMaxDuration ( ) const

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

◆ getMaximumInitial()

const float GKControlPhase::getMaximumInitial ( ) const

◆ getMinDuration()

const float GKControlPhase::getMinDuration ( ) const

Gets the phase minimum duration. Used only in adaptive and external control plans.

◆ getMinimumGap()

const float GKControlPhase::getMinimumGap ( ) const

◆ getPassageTime()

const float GKControlPhase::getPassageTime ( ) const

◆ getPermissivePeriodFrom()

const float GKControlPhase::getPermissivePeriodFrom ( ) const

◆ getPermissivePeriodTo()

const float GKControlPhase::getPermissivePeriodTo ( ) const

◆ getRecall()

const GKControlPhaseRecall GKControlPhase::getRecall ( ) const

◆ getRedToGreenYellowTimeDuration()

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.

◆ getSecondsActuation()

const float GKControlPhase::getSecondsActuation ( ) const

◆ getSignals()

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

◆ getTimeBeforeReduce()

const float GKControlPhase::getTimeBeforeReduce ( ) const

◆ getTimeToReduce()

const float GKControlPhase::getTimeToReduce ( ) const

◆ getWeakId()

const uint GKControlPhase::getWeakId ( ) const

◆ getYellowTimeDuration()

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.

◆ isFlashing()

GKControlPhaseSignal::FlashingType GKControlPhase::isFlashing ( int  idSignal) const

◆ isUsingGapReduction()

bool GKControlPhase::isUsingGapReduction ( ) const

returns whether is using gap reduction or not

◆ isUsingVariableInitial()

bool GKControlPhase::isUsingVariableInitial ( ) const

returns whether is using variable initial or not

◆ operator<()

bool GKControlPhase::operator< ( GKControlPhase v) const

Compares phases using the from time (GKControlPhase::getFrom)

◆ operator<=()

bool GKControlPhase::operator<= ( GKControlPhase v) const

Compares phases using the from time (GKControlPhase::getFrom)

◆ operator>()

bool GKControlPhase::operator> ( GKControlPhase v) const

Compares phases using the from time (GKControlPhase::getFrom)

◆ operator>=()

bool GKControlPhase::operator>= ( GKControlPhase v) const

Compares phases using the from time (GKControlPhase::getFrom)

◆ removeAllControlDetectors()

void GKControlPhase::removeAllControlDetectors ( )

Removes all detectors from this phase. Objects are not deleted.

◆ removeAllSignals()

void GKControlPhase::removeAllSignals ( )

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

◆ removeControlDetector()

void GKControlPhase::removeControlDetector ( const GKControlDetector detec)

Removes a detector from this phase. The object is not deleted.

◆ removeSignal()

void GKControlPhase::removeSignal ( uint  idSignal)

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

◆ setBeginCoord()

void GKControlPhase::setBeginCoord ( const GKControlPhaseBeginCoord  bc)

◆ setControlJunction()

void GKControlPhase::setControlJunction ( GKControlJunction junc)

◆ setDuration()

void GKControlPhase::setDuration ( const float  d)

Sets the phase duration.

◆ setFlashing()

void GKControlPhase::setFlashing ( int  idSignal,
GKControlPhaseSignal::FlashingType  flashing 
)

◆ setForceOff()

void GKControlPhase::setForceOff ( const float  aForceOff)

◆ setFrom()

void GKControlPhase::setFrom ( const float  time)

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

◆ setHold()

void GKControlPhase::setHold ( const bool  h)

◆ setIdBarrier()

void GKControlPhase::setIdBarrier ( const int  aIdBarrier)

◆ setIdRing()

void GKControlPhase::setIdRing ( const int  aIdRing)

◆ setInterphase()

void GKControlPhase::setInterphase ( const bool  a)

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

◆ setIsDefault()

void GKControlPhase::setIsDefault ( const bool  aIsDefault)

◆ setMaxDuration()

void GKControlPhase::setMaxDuration ( const float  maxD)

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

◆ setMaximumInitial()

void GKControlPhase::setMaximumInitial ( const float  maxI)

◆ setMinDuration()

void GKControlPhase::setMinDuration ( const float  minD)

Sets the phase minimum duration. Used only in adaptive and external control plans.

◆ setMinimumGap()

void GKControlPhase::setMinimumGap ( const float  minG)

◆ setPassageTime()

void GKControlPhase::setPassageTime ( const float  passT)

◆ setPermissivePeriodFrom()

void GKControlPhase::setPermissivePeriodFrom ( const float  fperiod)

◆ setPermissivePeriodTo()

void GKControlPhase::setPermissivePeriodTo ( const float  tperiod)

◆ setRecall()

void GKControlPhase::setRecall ( const GKControlPhaseRecall  r)

◆ setRedToGreenYellowTimeDuration()

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.

◆ setSecondsActuation()

void GKControlPhase::setSecondsActuation ( const float  secA)

◆ setTimeBeforeReduce()

void GKControlPhase::setTimeBeforeReduce ( const float  timeBR)

◆ setTimeToReduce()

void GKControlPhase::setTimeToReduce ( const float  timeTR)

◆ setUsingGapReduction()

void GKControlPhase::setUsingGapReduction ( bool  b)

sets using gap reduction option

◆ setUsingVariableInitial()

void GKControlPhase::setUsingVariableInitial ( bool  b)

sets using variable initial option

◆ setWeakId()

void GKControlPhase::setWeakId ( const uint  aid)

◆ setYellowTimeDuration()

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.

◆ turningHasGreen()

bool GKControlPhase::turningHasGreen ( GKTurning turning)

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

© Aimsun SLU
Aimsun ®