Aimsun Next Scripting
22
|
Public Member Functions | |
GKTrafficState () | |
void | clear () |
GKObject * | clone (bool addItToModel=true) const |
float | getEntranceFlow (GKSection *section, GKSection *fromSection) const |
void | setEntranceFlow (GKSection *section, GKSection *fromSection, float flow) |
float | getKeepFlowPercentage (GKSection *section, GKSection *fromSection) const |
void | setKeepFlowPercentage (GKSection *section, GKSection *fromSection, float flowPercentage) |
float | getTurningPercentage (GKSection *section, GKSection *toSection, GKSection *fromSection) const |
void | setTurningPercentage (GKSection *section, GKSection *toSection, GKSection *fromSection, float value) |
float | getExitFlow (GKSection *section, GKSection *toSection, GKSection *fromSection) const |
void | setExitFlow (GKSection *section, GKSection *toSection, GKSection *fromSection, float value) |
void | clearUseInputTurnings () |
void | clearUseInputTurnings (GKSection *section) |
bool | useInputTurnings (GKSection *section) const |
void | setUseInputTurnings (GKSection *section, bool useit) |
bool | isUseInputTurningDefined (GKSection *section) const |
bool | use (GKSection *section) const |
virtual GKObjectDelCmd * | getDelCmd () |
virtual GKObjectConnectionDelCmd * | getDelConnectionCmd (GKObject *) |
void | calculateTurnPercentagesFromExitFlows () |
![]() | |
GKTrafficDemandItem () | |
GKProblemNet * | getProblemNet () const |
void | setProblemNet (GKProblemNet *) |
GKUserClass * | getUserClass () const |
void | setUserClass (GKUserClass *userClass) |
GKMobileAgent * | getVehicle () const |
void | setVehicle (GKMobileAgent *avehicle) |
void | setInterval (const QTime &, const GKTimeDuration &) |
void | setFrom (const QTime &) |
void | setDuration (const GKTimeDuration &) |
const QTime & | getFrom () const |
const GKTimeDuration & | getDuration () const |
bool | equivalent (const GKTrafficDemandItem &) const |
bool | equivalent (const GKUserClass *uc, const QTime &, const GKTimeDuration &) const |
QString | getNameAutomatically (bool) 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 | |
![]() | |
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 |
![]() | |
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObject * | base = (GKBaseObject*)sipCpp |
sipType = 0 | |
![]() | |
static uint | weekdayAtt |
static uint | seasonAtt |
static uint | weatherAtt |
static uint | eventAtt |
static uint | methodologyAtt |
static uint | fromAtt |
static uint | durationAtt |
static uint | subnetworkAtt |
![]() | |
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 traffic state codes a Traffic Demand using two separate mechanisms:
For each section on a traffic state the information can be stored aggregated or disaggregated by the input sections of the section from where values are stored. This means that section A can have the information aggregated and section B disaggregated on the same traffic state. This allow the user to add detailed information where it is relevant (or where the data is available).
Example: section C has two input sections (A and B) and two output sections (D and E):
When editing section C flow values (input flow, keep flow percentage) and turn percentages the input sections A and B can be used. In this case the values will be:
This disaggregated information can be used to specify with great precision a traffic state. But it has two problems:
Having no data or no needed for a detailed description of a traffic state it is possible to enter a simplified version. In this case all the entrances are aggregated. Following the example the values to be edited will be:
GKTrafficState::GKTrafficState | ( | ) |
void GKTrafficState::calculateTurnPercentagesFromExitFlows | ( | ) |
Calculates the turn percentages for all the sections in the traffic state depending on the defined exit flows
void GKTrafficState::clear | ( | ) |
Removes all the section information stored in this state.
void GKTrafficState::clearUseInputTurnings | ( | ) |
Disable disaggregated information in all the sections.
void GKTrafficState::clearUseInputTurnings | ( | GKSection * | section | ) |
Disable disaggregated information in all the sections.
|
virtual |
It clones the whole traffic state and returns the copy. The cloned traffic state is added to the catalog if "addItToModel" is true.
Reimplemented from GKObject.
|
virtual |
Object will be deleted. The user must write a suitable GKObjectDelCmd subclass and return it in this method. The implementation in this class returns a GKObjectDelCmd as it is (it removes the object from the GKModel and delete it if needed after command destruction, removes the object from the GKGeoModel and removes connections to it).
Reimplemented from GKObject.
|
virtual |
This object has connections to "target" and "target" will be removed. Create and return a delete command to handle undo and redo of the affected connections. If the object is deleted outside a command (no UNDO) then the model will call GKObject::nonCommandObjectRemoved instead.
If this method returns a None it means that the delete is not possible and the command will not be done. If an object is connected to another but decides that no information is needed in the delete command then it has to return an empty GKObjectConnectionDelCmd instead of a None.
See also GKModel.
Reimplemented from GKObject.
Returns the entrance flow on "section". If fromSection is not None then the flow is disaggregated by entrance and "fromSection" is used. If fromSection is None then the aggregated value is used. Note that -1 is returned if undefined.
float GKTrafficState::getExitFlow | ( | GKSection * | section, |
GKSection * | toSection, | ||
GKSection * | fromSection | ||
) | const |
Returns the exit flow that, in section "section", uses turn to section "toSection". When data is stored taking into account input turns (see GKTrafficState::useInputTurnings) and fromSection is not None then the exit flow is disaggregated by entrance and "fromSection" is used. If input turns are not used or fromSection is None then the aggregated value is used. When fromSection is None, the boolean parameter is used to see if you want to use the disaggregated values to get the aggregated value when the aggregated one is not present. Note that -1 is returned if undefined.
Returns the percentage of vehicles that exits the network on "section". If fromSection is not None then the percentage is disaggregated by entrance and "fromSection" is used. If fromSection is None then the aggregated value is used. Note that -1 is returned if undefined.
float GKTrafficState::getTurningPercentage | ( | GKSection * | section, |
GKSection * | toSection, | ||
GKSection * | fromSection | ||
) | const |
Returns the percentage of vehicles that, in section "section", takes a turn to section "toSection". When data is stored taking into account input turns (see GKTrafficState::useInputTurnings) and fromSection is not None then the turn percentage is disaggregated by entrance and "fromSection" is used. If input turns are not used or fromSection is None then the aggregated value is used. Note that -1 is returned if undefined.
bool GKTrafficState::isUseInputTurningDefined | ( | GKSection * | section | ) | const |
Returns true if there is information about whether to use disaggregated information in "section"
Sets the entrance flow on "section". If fromSection is not None then the flow is disaggregated by entrance and "fromSection" is used.
void GKTrafficState::setExitFlow | ( | GKSection * | section, |
GKSection * | toSection, | ||
GKSection * | fromSection, | ||
float | value | ||
) |
Sets the exit flow that, in section "section", uses turn to section "toSection". If fromSection is not None then the exit flow is disaggregated by entrance and "fromSection" is used. If fromSection is None then the aggregated value is used.
void GKTrafficState::setKeepFlowPercentage | ( | GKSection * | section, |
GKSection * | fromSection, | ||
float | flowPercentage | ||
) |
Sets the percentage of vehicles that exits the network on "section". If fromSection is not None then the percentage is disaggregated by entrance and "fromSection" is used. If fromSection is None then the aggregated value is used.
void GKTrafficState::setTurningPercentage | ( | GKSection * | section, |
GKSection * | toSection, | ||
GKSection * | fromSection, | ||
float | value | ||
) |
Sets the percentage of vehicles that, in section "section", takes a turn to section "toSection". If fromSection is not None then the turn percentage is disaggregated by entrance and "fromSection" is used. If fromSection is None then the aggregated value is used.
void GKTrafficState::setUseInputTurnings | ( | GKSection * | section, |
bool | useit | ||
) |
If true disaggregated information in "section" is used, if false aggregated info is used.
bool GKTrafficState::use | ( | GKSection * | section | ) | const |
Returns true is this section is used in this state (if the state has information associated with it).
bool GKTrafficState::useInputTurnings | ( | GKSection * | section | ) | const |
Enable or disable disaggregated information in "section"