Aimsun Next Scripting
24.0
|
Public Member Functions | |
GKControlPlan () | |
virtual void | setName (const QString &) |
QString | getNameAutomatically () const |
GKControlJunction * | getControlJunction (int) const |
End GKControlJunction * | getControlJunction (const GKNode *) const |
GKControlJunction * | createControlJunction (uint) |
End GKControlJunction * | createControlJunction (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) |
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 GKControlMetering * | getControlMetering (GKMetering *metering) const |
GKControlMetering * | createControlMetering (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));}) |
![]() | |
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 GKNode * | node = (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*>() |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
Static Public Attributes | |
static End uint | offsetAtt |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
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 |
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"
GKControlPlan::GKControlPlan | ( | ) |
End void GKControlPlan::addControlJunction | ( | GKNode * | node, |
GKControlJunction * | junc | ||
) |
Assigns the control plan information "junc" to a node in this control plan. "junc" is adopted.
MethodCode sipCpp GKControlPlan::addControlJunction | ( | sipCpp-> | getModel) ->getCatalog().findById< GKNode >(a0, |
a1 | |||
) |
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.
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.
sipCpp GKControlPlan::applyControlJunctions | ( | [&res] (const GKNode *node, const GKControlJunction *junction){ res->insert(node->getId(), const_cast< GKControlJunction * >(junction));} | ) |
References GKObject::getId(), node, and res.
sipCpp GKControlPlan::applyControlMeterings | ( | [&res] (const GKMetering *metering, const GKControlMetering *cpMetering){ res->insert(metering->getId(), const_cast< GKControlMetering * >(cpMetering));} | ) |
References GKObject::getId(), and res.
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 * 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
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 information is initialized to eUnspecified.
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.
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.
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.
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.
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.
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"
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.
Removes the assigned control plan information for node. The control plan information (a GKControlJunction) is not deleted. The current GKControlJunction assigned to the node can be get with getControlJunction before this call.
MethodCode sipCpp GKControlPlan::removeControlJunction | ( | sipCpp-> | getModel) ->getCatalog().findById< GKNode >(a0 | ) |
void GKControlPlan::removeControlJunction | ( | uint | ) |
Deprecated Function. Removes the assigned control plan information for node "idNode". The control plan information (a GKControlJunction) is not deleted. The current GKControlJunction assigned to the node can be get with getControlJunction before this call.
void GKControlPlan::removeControlMetering | ( | GKMetering * | metering | ) |
Removes the control information defined for the metering.
|
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.
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.
Referenced by applyControlJunctions().
|
static |
Control plan offset (also called initial time)
MethodCode QMap<uint, GKControlMetering*>* GKControlPlan::res = new QMap<uint, GKControlMetering*>() |
Referenced by applyControlJunctions(), and applyControlMeterings().
MethodCode QMap<uint, GKControlJunction*>* GKControlPlan::res = new QMap<uint, GKControlJunction*>() |
GKControlPlan::sipRes = sipCpp->getControlJunction( node ) |