Aimsun Next Scripting: GKControlPlan Class Reference
Aimsun Next Scripting  22
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
GKControlPlan Class Reference
Inheritance diagram for GKControlPlan:
GKObject GKBaseObject

Public Member Functions

 GKControlPlan ()
 
virtual void setName (const QString &)
 
QString getNameAutomatically () const
 
GKControlJunctiongetControlJunction (int) const
 
End GKControlJunctiongetControlJunction (const GKNode *) const
 
GKControlJunctioncreateControlJunction (uint)
 
End GKControlJunctioncreateControlJunction (GKNode *)
 
void addControlJunction (uint idNode, GKControlJunction *junc)
 
MethodCode sipCpp addControlJunction (sipCpp->getModel() ->getCatalog().findById< GKNode >(a0), a1)
 
End void addControlJunction (GKNode *node, GKControlJunction *junc)
 
void removeControlJunction (uint)
 
MethodCode sipCpp removeControlJunction (sipCpp->getModel() ->getCatalog().findById< GKNode >(a0))
 
End void removeControlJunction (GKNode *node)
 
void setOffset (const int)
 
const int getOffset () const
 
QMap< uint, GKControlMetering * > getControlMeterings () const
 
sipCpp applyControlMeterings ([&res](const GKMetering *metering, const GKControlMetering *cpMetering){ res->insert(metering->getId(), const_cast< GKControlMetering * >(cpMetering));})
 
End GKControlMeteringgetControlMetering (GKMetering *metering) const
 
GKControlMeteringcreateControlMetering (GKMetering *metering)
 
void addControlMetering (GKMetering *metering, GKControlMetering *meter)
 
void removeControlMetering (GKMetering *metering)
 
QMap< uint, GKControlJunction * > getControlJunctions () const
 
sipCpp applyControlJunctions ([&res](const GKNode *node, const GKControlJunction *junction){ res->insert(node->getId(), const_cast< GKControlJunction * >(junction));})
 
virtual End GKObjectclone (bool addItToModel=true) const
 
void updateMatchesOffset ()
 
void updateRedToGreenYellowTimes ()
 
- Public Member Functions inherited from GKObject
 GKObject ()
 
 GKObject (const GKObject &o)
 
virtual void addedToCatalog ()
 
virtual void removedFromCatalog ()
 
uint getTick () const
 
virtual void increaseTick ()
 
void setTick (uint t)
 
virtual GKObjectclone (bool addItToModel=true) const
 
virtual GKObjectcloneAsTemporary (bool addItToModel=true) const
 
GKFoldergetCreateRootFolder ()
 
GKFoldergetRootFolder () const
 
void setRootFolder (GKFolder *afolder)
 
GKFolderfindFolder (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 GKTimeSeriegetDataValueTS (const GKColumn *attr) const
 
GKTimeSeriegetDataValueTSByID (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 GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const
 
GKObjectgetDataValueObjectByID (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 GKObjectgetMaster () const
 
GKTypegetType () const
 
virtual void setType (GKType *atype)
 
bool isA (const GKType *atype) const
 
bool isA (const QString &typeName) const
 
virtual void setModel (GKModel *amodel)
 
GKModelgetModel () 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)
 
- Public Member Functions inherited from GKBaseObject
 GKBaseObject ()
 
 if (base)
 
virtual uint getId () const =0
 
virtual const QString & getTypeName () const =0
 
virtual QString getTypeExternalName () const =0
 
virtual const GKObjectgetMaster () const =0
 
virtual const QString & getName () const =0
 
virtual const QString & getExternalId () const =0
 
virtual const QString & getDescription () const =0
 
virtual GKModelgetModel () 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 GKTimeSeriegetDataValueTS (const GKColumn *attr) const =0
 
virtual GKTimeSeriegetDataValueTSByID (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 GKObjectgetDataValueObject (const GKColumn *attr, const GKContext &context=GKContext::anyContext) const =0
 
virtual GKObjectgetDataValueObjectByID (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 GKNodenode = (GKNode *) sipCpp->getModel()->getCatalog().find( a0 )
 
 sipRes = sipCpp->getControlJunction( node )
 
MethodCode QMap< uint, GKControlMetering * > * res = new QMap<uint, GKControlMetering*>()
 
MethodCode QMap< uint, GKControlJunction * > * res = new QMap<uint, GKControlJunction*>()
 
- Public Attributes inherited from GKBaseObject
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObjectbase = (GKBaseObject*)sipCpp
 
 sipType = 0
 

Static Public Attributes

static uint offsetAtt
 
- Static Public Attributes inherited from GKObject
static uint typeNameAtt
 
static uint typeExternalNameAtt
 
static uint revisedAtt
 
- Static Public Attributes inherited from GKBaseObject
Py_END_ALLOW_THREADS static End uint idAtt
 
static uint nameAtt
 
static uint externalIdAtt
 
static uint descriptionAtt
 

Additional Inherited Members

- Public Types inherited from GKObject
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::IdentifierFormFlagIdentifierForm
 

Detailed Description

A node or a metering can belong to more than one control plan (that is different green times, signal group order, control type... the whole configuration).

The GKControlPlan class has, for each node, an associated GKControlJunction object, and for each metering, an associated GKControlMetering object.

The internal name of the centroid configuration folder is "GKModel::controlPlans" The external name is "Control Plans"

Constructor & Destructor Documentation

◆ GKControlPlan()

GKControlPlan::GKControlPlan ( )

Member Function Documentation

◆ addControlJunction() [1/3]

End void GKControlPlan::addControlJunction ( GKNode node,
GKControlJunction junc 
)

Assigns the control plan information "junc" to a node in this control plan. junc is adopted.

◆ addControlJunction() [2/3]

MethodCode sipCpp GKControlPlan::addControlJunction ( sipCpp->  getModel) ->getCatalog().findById< GKNode >(a0,
a1   
)

◆ addControlJunction() [3/3]

void GKControlPlan::addControlJunction ( uint  idNode,
GKControlJunction junc 
)

Deprecated function. Assigns the control plan information "junc" to a node "idNode" for this control plan. junc is adopted.

◆ addControlMetering()

void GKControlPlan::addControlMetering ( GKMetering metering,
GKControlMetering meter 
)

Associates the control information defined in "meter" with the metering "idmetering". Object "meter" is adopted. Note that only one control information can be associated with a metering in a control plan. If a GKControlMetering was already present it will be removed first from the association and the GKControlMetering instance will be deleted.

◆ applyControlJunctions()

sipCpp GKControlPlan::applyControlJunctions ( [&res] (const GKNode *node, const GKControlJunction *junction){ res->insert(node->getId(), const_cast< GKControlJunction * >(junction));}  )

References GKObject::getId(), node, and res.

◆ applyControlMeterings()

sipCpp GKControlPlan::applyControlMeterings ( [&res] (const GKMetering *metering, const GKControlMetering *cpMetering){ res->insert(metering->getId(), const_cast< GKControlMetering * >(cpMetering));}  )

References GKObject::getId(), and res.

◆ clone()

virtual End GKObject * GKControlPlan::clone ( bool  addItToModel = true) const
virtual

It clones the whole control plan and returns the copy. The cloned control plan is added to the catalog if "addItToModel" is true.

Reimplemented from GKObject.

◆ createControlJunction() [1/2]

End GKControlJunction * GKControlPlan::createControlJunction ( GKNode )

Creates a new control plan information for node if no control information has been created before. Otherwise it returns the current control plan information.

This method is equivalent to:

GKControlJunction *control = controlPlan->getControlJunction( node );
if( control == NULL ){
control = controlPlan->createControlJunction( node );
}
Control Plan data for a particular node.
Definition: GKControlJunction.sip:61
MethodCode GKNode * node
Definition: GKControlPlan.sip:56

◆ createControlJunction() [2/2]

GKControlJunction * GKControlPlan::createControlJunction ( uint  )

Deprecated function. Create a new control plan information for node "idnode" if no control information has been created before. Otherwise it returns the existing control plan.

This method is equivalent to:
\code
GKControlJunction *control = controlPlan->getControlJunction( idnode );
if( control == NULL ){
    control = controlPlan->createControlJunction( idnode );
}
\endcode

◆ createControlMetering()

GKControlMetering * GKControlPlan::createControlMetering ( GKMetering metering)

Creates a new control information of the same type as the metering (green, flow or delay) if the metering is uncontrolled. Otherwise, the method will return the current control metering. By default, new control informations are initialized to eUnspecified.

◆ getControlJunction() [1/2]

End GKControlJunction * GKControlPlan::getControlJunction ( const GKNode ) const

Returns this control plan information for node. If no control is associated it returns None. The method createControlJunction can be used to create a new (eUnspecified) control junction.

◆ getControlJunction() [2/2]

GKControlJunction * GKControlPlan::getControlJunction ( int  ) const

Deprecated function. Returns the associated control plan information for node "idnode". If no control information is associated it returns NULL. The method createControlJunction can be used to create a new (eUnspecified) control junction.

◆ getControlJunctions()

QMap< uint, GKControlJunction * > GKControlPlan::getControlJunctions ( ) const

Returns all the GKControlJunction for all nodes in this control plan. The key in the map is the GKNode id and the value is the GKControlJunction defined for that node in this control plan.

◆ getControlMetering()

End GKControlMetering * GKControlPlan::getControlMetering ( GKMetering metering) const

Returns the control information (a GKControlMetering) associated with the specified metering id. If no control information is associated it returns None.

◆ getControlMeterings()

QMap< uint, GKControlMetering * > GKControlPlan::getControlMeterings ( ) const

Returns all the GKControlMetering information in this control plan. The key in the map is the GKMetering id and the value is the GKControlMetering defined for that metering in this control plan.

◆ getNameAutomatically()

QString GKControlPlan::getNameAutomatically ( ) const

Generates the name of this object automatically based on its initial time The string will be: Control Plan "id" "initial Time"

◆ getOffset()

const int GKControlPlan::getOffset ( ) const

Gets the offset for this control plan. Note that this offset have not the same meaning as the offset in the GKControlJunction. This one is the time the control plan was designed to start at, that is, an offset from the 00:00:00 at which the control plan will be set as be in the second 0.

◆ removeControlJunction() [1/3]

End void GKControlPlan::removeControlJunction ( GKNode node)

Removes the assigned control plan information for node. The control plan information (a GKControlJunction) is not deleted. Is the resposability of the caller to delete it. The actual GKControlJunction assigned to the node can be get with getControlJunction before this call.

◆ removeControlJunction() [2/3]

MethodCode sipCpp GKControlPlan::removeControlJunction ( sipCpp->  getModel) ->getCatalog().findById< GKNode >(a0)

◆ removeControlJunction() [3/3]

void GKControlPlan::removeControlJunction ( uint  )

Deprecated Function. Removes the assigned control plan information for node "idNode". The control plan information (a GKControlJunction) is not deleted. It is the resposability of the caller to delete it. The actual GKControlJunction assigned to the node can be get with getControlJunction before this call.

◆ removeControlMetering()

void GKControlPlan::removeControlMetering ( GKMetering metering)

Desassociates the control information defined for the metering.

◆ setName()

virtual void GKControlPlan::setName ( const QString &  )
virtual

Sets the name of the control plan. It sets an automatic name (GKControlPlan::getNameAutomatically) when the users pass an empty name.

Reimplemented from GKObject.

◆ setOffset()

void GKControlPlan::setOffset ( const int  )

Sets the offset for this control plan. Note that this offset have not the same meaning as the offset in the GKControlJunction. This one is the time the control plan was designed to start at, that is, an offset from the 00:00:00 at which the control plan will be set as be in the second 0.

◆ updateMatchesOffset()

void GKControlPlan::updateMatchesOffset ( )

It is a requirement to call this function whenever the setMatchesOffsetWithEndOfPhase of one or several GKControlJunctions has been called.

◆ updateRedToGreenYellowTimes()

void GKControlPlan::updateRedToGreenYellowTimes ( )

It is a requirement to call this function whenever the setRedToGreenYellowTime of one or several GKControlJunctions has been called.

Member Data Documentation

◆ node

MethodCode GKNode * GKControlPlan::node = (GKNode *) sipCpp->getModel()->getCatalog().find( a0 )

Referenced by applyControlJunctions().

◆ offsetAtt

uint GKControlPlan::offsetAtt
static

Control plan offset (also called initial time)

◆ res [1/2]

MethodCode QMap<uint, GKControlMetering*>* GKControlPlan::res = new QMap<uint, GKControlMetering*>()

◆ res [2/2]

MethodCode QMap<uint, GKControlJunction*>* GKControlPlan::res = new QMap<uint, GKControlJunction*>()

◆ sipRes

GKControlPlan::sipRes = sipCpp->getControlJunction( node )

© Aimsun SLU
Aimsun ®