Aimsun Next Scripting
24.0
|
Public Types | |
enum | GKControlJunctionType { eUnspecified , eUncontrolled , eFixedControl , eExternal , eActuated } |
enum | OffsetReferencePoint { eBeginningOfFirstCoordinatedPhase , eBeginningOfLastCoordinatedPhase , eEndOfFirstCoordinatedPhase } |
![]() | |
enum | IdentifierFormFlag { eIdentifierDefault , eIdentifierId , eIdentifierName , eIdentifierExternalId , eIdentifierTypeExternalName , eIdentifierDescription , eIdentifierStandard , eIdentifierStandardWithType , eIdentifierAll } |
enum | GKLockType { eNone , eModification , eDelete , eModificationDelete } |
enum | GKObjectStatus { eNew , eSaved , eModified , eDeleted } |
typedef QFlags< GKObject::IdentifierFormFlag > | IdentifierForm |
Public Member Functions | |
GKControlJunction () | |
GKControlPlan * | getControlPlan () const |
void | setControlJunctionType (const GKControlJunctionType type) |
const GKControlJunctionType | getControlJunctionType () const |
void | setNode (const uint idN) |
MethodCode sipCpp | setNode (sipCpp->getModel() ->getCatalog().findById< GKNode >(a0)) |
End void | setNode (GKNode *node) |
GKNode * | getNode () const |
qint32 | getNodeId () const |
void | setCritical (const bool c) |
bool | getCritical () const |
void | setRestInRed (const bool c) |
bool | getRestInRed () const |
void | setOffsetReferencePoint (OffsetReferencePoint referencePoint) |
OffsetReferencePoint | getOffsetReferencePoint () const |
void | setOffset (const float o) |
float | getOffset () const |
GKControlPhase * | createPhase () |
void | addPhase (GKControlPhase *ph) |
void | removePhase (GKControlPhase *ph) |
void | removePhases () |
QString | getPhaseName (GKControlPhase *phase) const |
GKControlPhase * | getPhaseByPos (const int pos) const |
GKControlPhase * | getCoordinatedPhase (int idRing) const |
int | getNewPhaseId () |
GKControlPhase * | getPhaseById (const uint) const |
int | getPhaseIndex (GKControlPhase *) const |
int | getBarrierIndex (GKControlPhase *) const |
const QVector< GKControlPhase * > & | getPhases () const |
QVector< GKControlPhase * > & | sortPhases () |
QVector< GKControlPhase * > & | getPhasesForDelete () |
void | setCycle (const float) |
float | getCycle () const |
void | setYellowTime (const float) |
float | getYellowTime () const |
void | setRedToGreenYellowTime (const float aYellowTime) |
float | getRedToGreenYellowTime () const |
int | getRedPercentageInYellowTime () const |
void | setRedPercentageInYellowTime (int percentage) |
int | getNbRings () const |
int | getNbPhasesRing (int) const |
int | getNbBarriers () const |
void | setSingleEntry (const bool) |
bool | getSingleEntry () const |
GKBusPreemption * | createBusPreemption () const |
End void | addBusPreemption (GKBusPreemption *abusPreemption) |
void | removeBusPreemption (GKBusPreemption *abusPreemption) |
const QVector< GKBusPreemption * > & | getBusPreemptionList () const |
void | clearBusPreemption () |
QVector< float > & | getBarriers () |
void | addBarrier (float) |
void | removeBarrier () |
void | setBarrierTime (int, float) |
void | clearBarriers () |
void | calcActuatedForceOff () |
float | getActuatedCycle (int) const |
std::list< GKControlPlanSignalStartDuration > | getSignalsStartDuration () |
void | setPhasesFromSignals (const std::list< GKControlPlanSignalStartDuration > &signalsStartDuration) |
GKControlPhase * | getPreviousPhase (GKControlPhase *fromPhase, bool allowInterphases=true) const |
GKControlPhase * | getNextPhase (GKControlPhase *fromPhase, bool allowInterphases=true) const |
![]() | |
GKObject () | |
GKObject (const GKObject &o) | |
virtual void | addedToCatalog () |
virtual void | removedFromCatalog () |
uint | getTick () const |
virtual void | increaseTick () |
void | setTick (uint t) |
virtual GKObject * | clone (bool addItToModel=true, bool temporary=false) const |
GKObject * | cloneAsTemporary (bool addItToModel=true) const |
GKFolder * | getCreateRootFolder () |
GKFolder * | getRootFolder () const |
void | setRootFolder (GKFolder *afolder) |
GKFolder * | findFolder (const QString &byName) const |
QVector< GKFolder * > | getParentFolders () const |
bool | isDataValueNull (const GKColumn *attr) const |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const |
virtual void | setDataValue (const GKColumn *attr, const QVariant &v) |
void | setDataValueByID (uint attrId, const QVariant &v) |
virtual void | setDataValueObject (const GKColumn *attr, const GKObject *obj) |
void | setDataValueObjectByID (uint attrId, const GKObject *obj) |
virtual void | setDataValueDouble (const GKColumn *attr, double v) |
void | setDataValueDoubleByID (uint attrId, double v) |
virtual double | getDataValueInTS (const GKColumn *attr, unsigned int index, double *deviation=nullptr) const |
double | getDataValueInTSByID (uint attrId, unsigned int index, double *deviation=nullptr) const |
bool | hasAnyTSWithData () const |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const |
GKTimeSerie * | getDataValueTSByID (uint attrId) const |
virtual void | setDataValueInTS (const GKColumn *attr, unsigned int index, double value, double deviation, GKTSDescription *aDescription=nullptr) |
virtual void | setDataValueInTS (const GKColumn *attr, unsigned int index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=nullptr) |
void | setDataValueInTSByID (uint attrId, unsigned int index, double value, double deviation, GKTSDescription *aDescription=nullptr) |
void | setDataValueInExpandableTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=nullptr) |
virtual void | setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL) |
void | setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL) |
GKTimeSerie * | createDataValueTS (const GKColumn *attr, GKTSDescription *aDescription) |
virtual void | clearDataValueTS (const GKColumn *attr) |
void | clearDataValueTSByID (uint attrId) |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const |
GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const |
void | removeDataValue (const GKColumn *attr) |
void | removeDataValueByID (uint attrId) |
const QString & | getDescription () const |
void | setDescription (const QString &adescription) |
const QString & | getExternalId () const |
void | setExternalId (const QString &anId) |
virtual GKObjectDelCmd * | getDelCmd () |
virtual GKObjectConnectionDelCmd * | getDelConnectionCmd (GKObject *target) |
virtual void | nonCommandObjectRemoved (GKObject *) |
virtual void | init () |
virtual void | setId (uint aid, GKModel *model) |
uint | getId () const |
QUuid | getUUID () const |
virtual void | setName (const QString &aname) |
const QString & | getName () const |
QString | getExtendedId (IdentifierForm form=eIdentifierDefault) const |
QString | getNameOrExtendedId (IdentifierForm form=eIdentifierDefault) const |
virtual const QString & | getTypeName () const |
virtual QString | getTypeExternalName () const |
const GKObject * | getMaster () const |
GKType * | getType () const |
virtual void | setType (GKType *atype) |
bool | isA (const GKType *atype) const |
bool | isA (const QString &typeName) const |
virtual void | setModel (GKModel *amodel) |
GKModel * | getModel () const |
virtual void | setLock (GKLockType atype) |
GKLockType | getLock () const |
virtual bool | canBeDeleted () const |
virtual bool | canBeModified () const |
virtual bool | canBeEdited () const |
GKObjectStatus | getStatus () const |
virtual void | setStatus (const GKObjectStatus astatus) |
void | notifyStatusChange () |
bool | isTemporary () const |
void | setTemporary (bool value) |
bool | isExternal () const |
void | setExternal (bool value) |
virtual void | preferencesChanged () |
void | removeColumn (GKColumn *column) |
void | resetColumn (GKColumn *column) |
![]() | |
GKBaseObject () | |
if (base) | |
virtual uint | getId () const =0 |
virtual const QString & | getTypeName () const =0 |
virtual QString | getTypeExternalName () const =0 |
virtual const GKObject * | getMaster () const =0 |
virtual const QString & | getName () const =0 |
virtual const QString & | getExternalId () const =0 |
virtual const QString & | getDescription () const =0 |
virtual GKModel * | getModel () const =0 |
virtual QVariant * | getDataValue (const GKColumn *attr, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual QVariant * | getDataValueByID (uint attrId, bool *deleteit, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueInTS (const GKColumn *attr, unsigned int index, double *deviation=NULL) const =0 |
virtual double | getDataValueInTSByID (uint attrId, unsigned int index, double *deviation=nullptr) const =0 |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const =0 |
virtual GKTimeSerie * | getDataValueTSByID (uint attrId) const =0 |
virtual int | getDataValueInt (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual int | getDataValueIntByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDouble (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual double | getDataValueDoubleByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueString (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QString | getDataValueStringByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBool (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual bool | getDataValueBoolByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKObject * | getDataValueObjectByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDate (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDate | getDataValueDateByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QTime | getDataValueTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTime (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual QDateTime | getDataValueDateTimeByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDuration (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0 |
virtual GKTimeDuration | getDataValueTimeDurationByID (uint attrId, const GKContext &context=GKContext::anyContext) const =0 |
Public Attributes | |
MethodCode | sipRes = new GKBusPreemption() |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
Additional Inherited Members | |
![]() | |
static uint | typeNameAtt |
static uint | typeExternalNameAtt |
static uint | revisedAtt |
![]() | |
Py_END_ALLOW_THREADS static End uint | idAtt |
static uint | nameAtt |
static uint | externalIdAtt |
static uint | descriptionAtt |
The GKControlJunction contains the control plan data associated with one node for one control plan. The control plan is the owner of this data.
It contains timing information for each phase (GKControlPhase) and some data common to all the phases.
Usually the data to be edited will be:
See GKControlJunction::setControlJunctionType
Enumerator | |
---|---|
eUnspecified | |
eUncontrolled | |
eFixedControl | |
eExternal | |
eActuated |
GKControlJunction::GKControlJunction | ( | ) |
void GKControlJunction::addBarrier | ( | float | ) |
Adds a new barrier at the specified second
End void GKControlJunction::addBusPreemption | ( | GKBusPreemption * | abusPreemption | ) |
Adds a new bus priority
void GKControlJunction::addPhase | ( | GKControlPhase * | ph | ) |
Add a phase. The object "ph" is adopted.
void GKControlJunction::calcActuatedForceOff | ( | ) |
Calculates the default parameters (force-off and permissive period) when the control plan is actuated.
void GKControlJunction::clearBarriers | ( | ) |
Removes all barriers
void GKControlJunction::clearBusPreemption | ( | ) |
Remove all bus priorities
GKBusPreemption * GKControlJunction::createBusPreemption | ( | ) | const |
Returns a new instance of a GKBusPreemption. It is NOT added to this control junction, call addBusPreemption
GKControlPhase * GKControlJunction::createPhase | ( | ) |
Creates a new phase and add it to this control junction.
float GKControlJunction::getActuatedCycle | ( | int | ) | const |
Returns the real cycle when the control plan is actuated. This is the sum of maximum green of all phases belonging the ring.
int GKControlJunction::getBarrierIndex | ( | GKControlPhase * | ) | const |
Returns the barrier index of the phase
QVector< float > & GKControlJunction::getBarriers | ( | ) |
Returns a vector with as many positions as barriers. The info in the vector is the duration of each barrier.
const QVector< GKBusPreemption * > & GKControlJunction::getBusPreemptionList | ( | ) | const |
Returns the bus priority list
const GKControlJunctionType GKControlJunction::getControlJunctionType | ( | ) | const |
Gets the control type for the node. See GKControlJunction::setControlJunctionType
GKControlPlan * GKControlJunction::getControlPlan | ( | ) | const |
The control plan that contains this control junction info.
GKControlPhase * GKControlJunction::getCoordinatedPhase | ( | int | idRing | ) | const |
Returns the coordinated phase of the ring idRing. If the ring does not have any coordinated phase then returns None.
bool GKControlJunction::getCritical | ( | ) | const |
It's a critical node?
float GKControlJunction::getCycle | ( | ) | const |
gets the cycle of for this node (in seconds).
int GKControlJunction::getNbBarriers | ( | ) | const |
Returns the number of barriers as used by the phases.
int GKControlJunction::getNbPhasesRing | ( | int | ) | const |
Return the number of phases that belongs to the specified ring.
int GKControlJunction::getNbRings | ( | ) | const |
Returns the number of rings as used by the phases.
int GKControlJunction::getNewPhaseId | ( | ) |
Returns an unused id for a new phase
GKControlPhase * GKControlJunction::getNextPhase | ( | GKControlPhase * | fromPhase, |
bool | allowInterphases = true |
||
) | const |
Returns the next phase in the same ring. If allowInterphases is true, it may return an interphase. If allowInterphase is false, it will return the next non-interphase phase in the ring or nullptr if no phases in the ring meet the condition.
GKNode * GKControlJunction::getNode | ( | ) | const |
Gets the node
qint32 GKControlJunction::getNodeId | ( | ) | const |
Gets the node id.
float GKControlJunction::getOffset | ( | ) | const |
Node offset to implement green waves.
OffsetReferencePoint GKControlJunction::getOffsetReferencePoint | ( | ) | const |
For actuated junctions with coordinated phases, the coordinated point can be the beginning or end of the first coordinated phase or the beginning of the last coordinated phase
GKControlPhase * GKControlJunction::getPhaseById | ( | const | uint | ) | const |
Get the phase using its ID
GKControlPhase * GKControlJunction::getPhaseByPos | ( | const int | pos | ) | const |
Get the phase at the position "pos" (from 0 to N-1)
int GKControlJunction::getPhaseIndex | ( | GKControlPhase * | ) | const |
Returns the index position of the phase in its ring
QString GKControlJunction::getPhaseName | ( | GKControlPhase * | phase | ) | const |
Return a name for this phase based on its position. Usually from 1 to N from left to right and from the first to the last ring.
const QVector< GKControlPhase * > & GKControlJunction::getPhases | ( | ) | const |
Returns all the phases.
QVector< GKControlPhase * > & GKControlJunction::getPhasesForDelete | ( | ) |
Returns all the phases in a non constant set to delete some of them.
GKControlPhase * GKControlJunction::getPreviousPhase | ( | GKControlPhase * | fromPhase, |
bool | allowInterphases = true |
||
) | const |
Returns the previous phase in the same ring. If allowInterphases is true, it may return an interphase. If allowInterphase is false, it will return the previuos non-interphase phase in the ring or nullptr if no phases in the ring meet the condition.
int GKControlJunction::getRedPercentageInYellowTime | ( | ) | const |
What percentage of the yellow time is sused by the driver as red. 0 means that all the yellow time will be simulated as green. 100 means that all the yellow time will be simulated as red.
Note that, in any case, the simulator will display the traffic signal in yellow.
By defaulf if 50%.
float GKControlJunction::getRedToGreenYellowTime | ( | ) | const |
Gets the red to green yellow time for this node, common to all the phases and in seconds.
bool GKControlJunction::getRestInRed | ( | ) | const |
Returns the rest in red value
std::list< GKControlPlanSignalStartDuration > GKControlJunction::getSignalsStartDuration | ( | ) |
Returns a list of GKControlPlanSignalStartDurations describing the signals used by this control junction along with their start and duration times for each occurrence of each signal. To change the values in the control junction, use GKControlJunction::setPhasesFromSignals
bool GKControlJunction::getSingleEntry | ( | ) | const |
Returns the Single Entry value
float GKControlJunction::getYellowTime | ( | ) | const |
Gets the yellow time, from green to red state, for this node, common to all the phases and in seconds.
void GKControlJunction::removeBarrier | ( | ) |
Removes the last barrier
void GKControlJunction::removeBusPreemption | ( | GKBusPreemption * | abusPreemption | ) |
Removes the bus priority
void GKControlJunction::removePhase | ( | GKControlPhase * | ph | ) |
Removes a phase from this node. The object "ph" is not deleted just removed from the GKControlJunction object.
void GKControlJunction::removePhases | ( | ) |
Removes all phases from this GKControlJunction object. The phases are deleted too.
void GKControlJunction::setBarrierTime | ( | int | , |
float | |||
) |
Sets the duration of the specified barrier
void GKControlJunction::setControlJunctionType | ( | const GKControlJunctionType | type | ) |
Sets the control type for the node. It can be:
void GKControlJunction::setCritical | ( | const bool | c | ) |
It's a critical node?
void GKControlJunction::setCycle | ( | const float | ) |
sets the cycle of for this node (in seconds).
void GKControlJunction::setNode | ( | const uint | idN | ) |
Deprecated function. Sets the node identifier.
Sets the node. Called automatically by GKControlPlan::addControlJunction
MethodCode sipCpp GKControlJunction::setNode | ( | sipCpp-> | getModel) ->getCatalog().findById< GKNode >(a0 | ) |
void GKControlJunction::setOffset | ( | const float | o | ) |
Node offset to implement green waves.
void GKControlJunction::setOffsetReferencePoint | ( | OffsetReferencePoint | referencePoint | ) |
For actuated junctions with coordinated phases, the coordinated point can be the beginning or end of the first coordinated phase or the beginning of the last coordinated phase
void GKControlJunction::setPhasesFromSignals | ( | const std::list< GKControlPlanSignalStartDuration > & | signalsStartDuration | ) |
Deletes the current phases of the control junction and creates new ones using the given signals and their start and duration times
void GKControlJunction::setRedPercentageInYellowTime | ( | int | percentage | ) |
What percentage of the yellow time is used by the driver as red. 0 means that all the yellow time will be simulated as green. 100 means that all the yellow time will be simulated as red.
Note that, in any case, the simulator will display the traffic signal in yellow.
By defaulf if 50%.
void GKControlJunction::setRedToGreenYellowTime | ( | const float | aYellowTime | ) |
Sets the red to green yellow time for this node, common to all the phases and in seconds.
void GKControlJunction::setRestInRed | ( | const bool | c | ) |
Only for actuated control junctions. If there isn't any new call, it turns the current phase to red
void GKControlJunction::setSingleEntry | ( | const bool | ) |
On Multiring junctions. The Single Entry parameter is a mode of operation in which a phase in one ring can be activated alone if there is no call in a non-conflicting phase on any other ring.
void GKControlJunction::setYellowTime | ( | const float | ) |
Sets the yellow time, from green to red state, for this node, common to all the phases and in seconds.
QVector< GKControlPhase * > & GKControlJunction::sortPhases | ( | ) |
Sort the phases in this GKControlJunction using their "<" operator (by from time)
MethodCode GKControlJunction::sipRes = new GKBusPreemption() |