Aimsun Next Scripting
22
|
Public Types | |
enum | GKControlJunctionType { eUnspecified , eUncontrolled , eFixedControl , eExternal , eActuated } |
![]() | |
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) |
const bool | getCritical () const |
void | setRestInRed (const bool c) |
const bool | getRestInRed () const |
void | setMatchesOffsetWithEndOfPhase (const bool c) |
bool | getMatchesOffsetWithEndOfPhase () const |
void | setOffset (const float o) |
const 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) |
const float | getCycle () const |
void | setYellowTime (const float) |
const float | getYellowTime () const |
void | setRedToGreenYellowTime (const float aYellowTime) |
float | getRedToGreenYellowTime () const |
const int | getRedPercentageInYellowTime () const |
void | setRedPercentageInYellowTime (int percentage) |
int | getNbRings () const |
int | getNbPhasesRing (int) const |
const int | getNbBarriers () const |
void | setSingleEntry (const bool) |
const bool | getSingleEntry () const |
GKBusPreemption * | createBusPreemption () const |
End void | addBusPreemption (GKBusPreemption *abusPreemption) |
void | removeBusPreemption (GKBusPreemption *abusPreemption) |
const QVector< GKBusPreemption * > & | getBusPreemptionList () const |
void | clearBusPreemption () |
QVector< int > & | getBarriers () |
void | addBarrier (int) |
void | removeBarrier () |
void | setBarrierTime (int, int) |
void | clearBarriers () |
GKControlJunction * | clone (bool addItToModel=true) const |
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) const |
virtual 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, GKTimeSerieIndex index, double *deviation=NULL) const |
double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) const |
bool | hasAnyTSWithData () const |
virtual GKTimeSerie * | getDataValueTS (const GKColumn *attr) const |
GKTimeSerie * | getDataValueTSByID (uint attrId) const |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, double lowerValue, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setDataValueInSingleTS (const GKColumn *attr, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription) |
void | setDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double value, double deviation, GKTSDescription *aDescription=NULL, int reservedSize=0) |
virtual void | setAggregatedValueInTS (const GKColumn *attr, double value, double deviation, GKTSDescription *aDescription=NULL) |
void | setAggregatedValueInTSByID (uint attrId, double value, double deviation, GKTSDescription *aDescription=NULL) |
virtual void | clearDataValueTS (const GKColumn *attr, GKTSDescription *aDescription=NULL) |
void | clearDataValueTSByID (uint attrId, GKTSDescription *aDescription=NULL) |
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, GKTimeSerieIndex index, double *deviation=NULL) const =0 |
virtual double | getDataValueInTSByID (uint attrId, GKTimeSerieIndex index, double *deviation=NULL) 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 | ( | int | ) |
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 permisive period) when the control plan is actuated.
void GKControlJunction::clearBarriers | ( | ) |
Removes all barriers
void GKControlJunction::clearBusPreemption | ( | ) |
Remove all bus priorities
|
virtual |
Clones the current control junction
Reimplemented from GKObject.
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< int > & GKControlJunction::getBarriers | ( | ) |
Returns all barriers
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.
const bool GKControlJunction::getCritical | ( | ) | const |
It's a critical node?
const float GKControlJunction::getCycle | ( | ) | const |
gets the cycle of for this node (in seconds).
bool GKControlJunction::getMatchesOffsetWithEndOfPhase | ( | ) | const |
For actuated junctions with coordinated phases, the coordinated point can be the end of the coordinated phase (true) or the beginning of the coordinated phase (false)
const 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.
const float GKControlJunction::getOffset | ( | ) | const |
Node offset to implement green waves.
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.
const 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.
const bool GKControlJunction::getRestInRed | ( | ) | const |
Returns the rest in red value
std::list< GKControlPlanSignalStartDuration > GKControlJunction::getSignalsStartDuration | ( | ) |
Returns the signals used by this control junction along with the start and duration times for each ocurrence of the signal
const bool GKControlJunction::getSingleEntry | ( | ) | const |
Returns the Single Entry value
const 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. The caller has the responsibility of deleting the object.
void GKControlJunction::removePhases | ( | ) |
Removes all phases from this GKControlJunction object. The phases are deleted too.
void GKControlJunction::setBarrierTime | ( | int | , |
int | |||
) |
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::setMatchesOffsetWithEndOfPhase | ( | const bool | c | ) |
For actuated junctions with coordinated phases, the coordinated point can be the end of the coordinated phase (true) or the beginning of the coordinated phase (false). It is a requirement to call the updateMatchesOffset function of a GKControlPlan after having called this function for one or several GKCotrolJunction.
void GKControlJunction::setNode | ( | const uint | idN | ) |
Deprecated function. Sets the node identifier.
End void GKControlJunction::setNode | ( | GKNode * | node | ) |
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::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() |