Aimsun Next Scripting
22
|
Public Types | |
enum | GKNodeType { eSimpleNode , eComplexNode , eMerging , eDiverging } |
![]() | |
enum | GKGeoContainer { eNothing = 0 , ePartially = 1 , eTotally = 2 } |
![]() | |
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 | |
GKNode () | |
void | addTurning (GKTurning *turning, bool curveTurning, bool sortTurnings=true) |
bool | removeTurning (GKTurning *) |
const QVector< GKTurning * > & | getTurnings () const |
void | orderTurningsById () |
QVector< GKTurning * > | getFromTurnings (GKSection *) const |
GKTurnings | getFromTurnings (const GKSection *from, int laneIndex) const |
GKTurnings | getFromTurningsOrderedFromLeftToRight (const GKSection *fromPolyline) const |
GKTurnings | getFromTurningsOrderedFromRightToLeft (const GKSection *fromPolyline) const |
GKTurnings | getToTurningsOrderedFromLeftToRight (const GKSection *toPolyline) const |
GKTurnings | getToTurningsOrderedFromRightToLeft (const GKSection *toPolyline) const |
QVector< GKTurning * > | getToTurnings (GKSection *) const |
GKTurnings | getToTurnings (const GKSection *section, int laneIndex) const |
bool | anyFromTurnings (const GKSection *from) const |
bool | anyToTurnings (const GKSection *to) const |
GKTurning * | getTurning (GKSection *, GKSection *) const |
bool | existTurning (GKSection *, GKSection *) const |
bool | neededSection (GKSection *) const |
void | changeTurningsOriginToAnotherSection (GKSection *oldObject, GKSection *newObject) |
GKNodeType | getNodeType () const |
void | updatePosition () |
GKPoints | getPolygon () const |
bool | isYellowBox () const |
void | setYellowBox (bool) |
GKControlPlanSignal * | getFirstSignal (const GKTurning *) const |
int | getNumberSignals (const GKTurning *) const |
const QList< GKControlPlanSignal * > & | getSignals () const |
void | addSignal (GKControlPlanSignal *) |
void | removeSignal (GKControlPlanSignal *) |
bool | usesSignal (GKControlPlanSignal *) const |
uint | getSignalPos (uint, uint scenarioId=0) const |
GKControlPlanSignal * | getSignal (uint idSignal) const |
bool | userDefinedPriorities () const |
void | setUserDefinedPriorities (bool) |
bool | hasPriority (GKTurning *, GKTurning *) const |
void | setPriority (GKTurning *, GKTurning *, bool) |
void | discardAllPriorities () |
bool | laneUsed (GKSection *, uint, bool, bool) const |
uint | getNumExitSections () const |
uint | getNumEntranceSections () const |
QVector< GKSection * > | getExitSections () const |
QVector< GKSection * > | getEntranceSections () const |
void | setUserDefinedTurningConflict (const GKTurning *turn1, const GKTurning *turn2, bool priority) |
bool | conflictingTurnings (const GKTurning *iTurning1, const GKTurning *iTurning2, bool considerUserDefinedConflicts=true) const |
bool | userDefinedConflicts () const |
void | setUserDefinedConflicts (bool value) |
![]() | |
GKDPoint () | |
const GKPoint & | getPosition () const |
virtual void | setPosition (const GKPoint &p) |
virtual void | translate (const GKPoint &delta) |
virtual void | rotate (const GKPoint ¢er, double angle) |
virtual GKCoord | getAltitude () const |
virtual void | setAltitude (GKCoord value) |
![]() | |
GKGeoObject () | |
virtual void | setSelected (bool newState) |
virtual bool | isSelected () const |
bool | canBeModified () const |
bool | canBeEdited () const |
virtual bool | canBeGrouped () const |
int | getMark () const |
void | setMark (int newMark) |
void | addMark (int newMark) |
void | unmark () |
const QVector< int > * | getMarks () const |
uint | getNumberOfMarks () const |
GKLayer * | getLayer () const |
void | setLayer (GKLayer *alayer) |
virtual void | translate (const GKPoint &delta) |
virtual void | rotate (const GKPoint ¢er, double angle) |
virtual void | scale (const GKPoint &) |
virtual GKCoord | getAltitude () const |
virtual void | setAltitude (GKCoord value) |
void | addTopObject (GKGeoObject *) |
QSet< GKGeoObject * > * | getTopObjects () const |
GKGeoObject * | getBottomObject () const |
void | setLabeled (bool value) |
bool | isLabeled () const |
GKGeoContainer | getContainedWay (const GKPoints &points, const GKBBox &bboxPoints) const |
virtual GKGeoContainer | doGetContainedWay (const GKBBox &myBBox, const GKPoints &points, const GKBBox &bboxPoints) const |
GK::ConnectionType | objectConnectionType (const GKGeoObject *object) const |
QSet< GKObjectConnection * > | getConnections () const |
QSet< GKObjectConnection * > | getConnections (const GKGeoObject *) const |
bool | anyConnection (const GKGeoObject *) const |
virtual void | addConnection (GKObjectConnection *) |
virtual void | removeConnection (GKObjectConnection *, GK::ObjectDeletionBehaviour) |
virtual void | changeConnectionObject (GKGeoObject *oldObject, GKGeoObject *newObject, GK::ConnectionType connectionType=GK::eConnectionUndefined) |
virtual void | removeAllConnections (GK::ObjectDeletionBehaviour) |
virtual bool | acceptConnection (GKGeoObject *object) const |
virtual GKGeoObjectCutCmd * | getCutCmd (const GKPoint &from, const GKPoint &to, bool keepConnection) |
virtual bool | exists (quint32 scenarioId) 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 |
Additional Inherited Members | |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
![]() | |
static uint | markAtt |
static uint | altitudeAtt |
static uint | numberOfConnectionsAtt |
static uint | layerAtt |
![]() | |
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 |
A node is a point or an area in the network where vehicles change their direction and/or disperse. Hence, a node has one or more origin sections and one or more destination sections. Each node has a turns list, which determines the possible exits of a vehicle entering the nodes.
enum GKNode::GKNodeType |
GKNode::GKNode | ( | ) |
void GKNode::addSignal | ( | GKControlPlanSignal * | ) |
Add a signal group to this node. The object is adopted.
void GKNode::addTurning | ( | GKTurning * | turning, |
bool | curveTurning, | ||
bool | sortTurnings = true |
||
) |
Adds a turn to this node. The object is adopted. If curveTurning is true the turn will be curve (GKTurning::curve)
By default it sorts the turns by ID. When adding several turns (in a importer for example) is faster to add them without sorting and call after all the adds to GKNode::orderTurningsById
bool GKNode::anyFromTurnings | ( | const GKSection * | from | ) | const |
Returns true is there are any turning that starts at section "from" .
bool GKNode::anyToTurnings | ( | const GKSection * | to | ) | const |
Returns true is there are any turn that ends at section "to".
Look in the turns and change the connection origin from "oldObject" to "newObject". So, all the connections from "oldObject" will be then turns from "newObject".
This function will not change the GKSection::origin or GKSection::destination attributes.
bool GKNode::conflictingTurnings | ( | const GKTurning * | iTurning1, |
const GKTurning * | iTurning2, | ||
bool | considerUserDefinedConflicts = true |
||
) | const |
Return if the two turns are considered conflicting.
void GKNode::discardAllPriorities | ( | ) |
Removes all the priorities info.
Any connection between "from" a "to" sections?
QVector< GKSection * > GKNode::getEntranceSections | ( | ) | const |
Returns a vector with the entrance sections.
QVector< GKSection * > GKNode::getExitSections | ( | ) | const |
Returns a vector with the exit sections.
GKControlPlanSignal * GKNode::getFirstSignal | ( | const GKTurning * | ) | const |
Returns the first signal that contains this turn if any or None if the turn is not used in any signal group.
GKTurnings GKNode::getFromTurnings | ( | const GKSection * | from, |
int | laneIndex | ||
) | const |
Gets turns that starts at section "from" at lane "laneIndex" where 0 is the leftmost lane and N-1 is the rightmost lane where N is the total number of lanes in the section.
Gets turns that starts at section "from".
GKTurnings GKNode::getFromTurningsOrderedFromLeftToRight | ( | const GKSection * | fromPolyline | ) | const |
Gets turns that starts at section "from" ordered from left to right in the section direction.
GKTurnings GKNode::getFromTurningsOrderedFromRightToLeft | ( | const GKSection * | fromPolyline | ) | const |
Gets turns that starts at section "from" ordered from right to left in the section direction.
GKNodeType GKNode::getNodeType | ( | ) | const |
Calculates the type of this node based on its turns as eSimpleNode, eComplexNode, eMerging or eDiverging.
int GKNode::getNumberSignals | ( | const GKTurning * | ) | const |
Returns the number of signals where the turn "turn" is in.
uint GKNode::getNumEntranceSections | ( | ) | const |
Returns the number of entrance sections.
uint GKNode::getNumExitSections | ( | ) | const |
Returns the number of exit sections.
GKPoints GKNode::getPolygon | ( | ) | const |
Calculates the convex polygon that contains all the node turns.
GKControlPlanSignal * GKNode::getSignal | ( | uint | idSignal | ) | const |
Returns a signal group for this node by its identifier.
uint GKNode::getSignalPos | ( | uint | , |
uint | scenarioId = 0 |
||
) | const |
Returns the position of a signal in the list of all the signal groups in this node. The signal group is identified by its unique ID. If scenarioId is greater than zero it will consider only the signal groups existing in that scenario.
const QList< GKControlPlanSignal * > & GKNode::getSignals | ( | ) | const |
Returns all the signal groups for this node.
GKTurnings GKNode::getToTurnings | ( | const GKSection * | section, |
int | laneIndex | ||
) | const |
Gets turns that ends at section "section" at lane "laneIndex" where 0 is the leftmost lane and N-1 is the rightmost lane where N is the total number of lanes in the section.
Gets turns that ends at section "to".
GKTurnings GKNode::getToTurningsOrderedFromLeftToRight | ( | const GKSection * | toPolyline | ) | const |
Gets turns that starts at section "to" ordered from left to right in the section direction.
GKTurnings GKNode::getToTurningsOrderedFromRightToLeft | ( | const GKSection * | toPolyline | ) | const |
Gets turns that starts at section "to" ordered from right to left in the section direction.
Gets turn that starts at "from" and ends at "to".
const QVector< GKTurning * > & GKNode::getTurnings | ( | ) | const |
Gets the list of all the turns in this connector.
Returns true if turn turn1 has priority over turn2.
bool GKNode::isYellowBox | ( | ) | const |
Is a yellow box?
bool GKNode::laneUsed | ( | GKSection * | , |
uint | , | ||
bool | , | ||
bool | |||
) | const |
Returns true if a lane from section is used in any turn of this node. If asOrigin is true then the method will return true if is used in a turn and from this lane the turn starts. If asDestination is true then the method will return true if is used in a turn and to this lane the turn ends. If both are true, it will return true if any turn uses this lane.
bool GKNode::neededSection | ( | GKSection * | ) | const |
Returns true if removing all the turns used by this section will remove in fact all the connector turns (that is, all the connection uses this section).
void GKNode::orderTurningsById | ( | ) |
Sort the turns by id. Required if turns are added unsorted (.
void GKNode::removeSignal | ( | GKControlPlanSignal * | ) |
Removes a signal group from this node. The object is not deleted.
bool GKNode::removeTurning | ( | GKTurning * | ) |
Removes a turn from this node. Note that turn is a pointer to the turn that will be removed. The connection will NOT be deleted.
If the turn is not found in this node it will return false and true otherwise.
Sets turn turn1 priority over turn2 or removes it, depending on the value of priority.
void GKNode::setUserDefinedConflicts | ( | bool | value | ) |
Activate or deactive user-defined conflicts.
void GKNode::setUserDefinedPriorities | ( | bool | ) |
Activate or desactivate user-defined priorities.
void GKNode::setUserDefinedTurningConflict | ( | const GKTurning * | turn1, |
const GKTurning * | turn2, | ||
bool | priority | ||
) |
Set if turn1 and turn2 are conflicting turns.
void GKNode::setYellowBox | ( | bool | ) |
Mark (or unmark) this node as yellow box.
void GKNode::updatePosition | ( | ) |
Update the node position. As the position is only relevant to macro model be sure to update it before using it. At this moment no auto update is done.
bool GKNode::userDefinedConflicts | ( | ) | const |
Are user-defined conflicts used in this node?
bool GKNode::userDefinedPriorities | ( | ) | const |
Are user-defined priorities used in this node?
bool GKNode::usesSignal | ( | GKControlPlanSignal * | ) | const |
Returns true if the signal is from this node.