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

Public Types

enum  DetectorLocationStatus { eUninitialized , ePending , eLoaded }
 
- 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
 

Public Member Functions

 DetectorLocation ()
 
void setExperiment (MacroExperiment *exp)
 
MacroExperimentgetExperiment () const
 
void setMaximumNumberOfDetectorsToCreate (int maxNbDetectors)
 
int getMaximumNumberOfDetectorsToCreate () const
 
void setPercentageOfTripsToAchieve (double percentage)
 
double getPercentageOfTripsToAchieve () const
 
void addExistingDetectorToConsider (GKDetector *detector)
 
QList< GKDetector * > getExistingDetectorsToConsider () const
 
void clearExistingDetectorsToConsider ()
 
void addSectionToAvoid (GKSection *section)
 
QList< GKSection * > getSectionsToAvoid () const
 
void clearSectionsToAvoid ()
 
double getPercentageOfTripsAchievedWithExistingDetectorsToConsider () const
 
QList< QPair< GKSection *, double > > getCandidateSections () const
 
QList< GKSection * > getSectionsWithDetectorCreated () const
 
const QString & getErrorMessage () const
 
bool calculateDetectorLocation ()
 
DetectorLocationStatus getDetectorLocationStatus () const
 
- 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
 

Additional Inherited Members

- Public Attributes inherited from GKBaseObject
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObjectbase = (GKBaseObject*)sipCpp
 
 sipType = 0
 
- 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
 

Member Enumeration Documentation

◆ DetectorLocationStatus

Enumerator
eUninitialized 
ePending 
eLoaded 

Constructor & Destructor Documentation

◆ DetectorLocation()

DetectorLocation::DetectorLocation ( )

Member Function Documentation

◆ addExistingDetectorToConsider()

void DetectorLocation::addExistingDetectorToConsider ( GKDetector detector)

Adds an existing detector as a valid detector wanted to be taken into account when executing the detection layout algorithm

◆ addSectionToAvoid()

void DetectorLocation::addSectionToAvoid ( GKSection section)

Adds a section that cannot be selected as candidate to locate a detector on, when executing the detection layout algorithm

◆ calculateDetectorLocation()

bool DetectorLocation::calculateDetectorLocation ( )

Calculates the detection layout output parameters, that is, the candidate sections where to locate the new detectors on as well as the percentage of original trips covered, depending on the input parameters defined, that are the experiment where to get the flows and paths data, the maximum number of detectors to create, the minimum percentage of trips to cover, the list of existing detectors to consider in the algorithm as well as the list of sections where a detector cannot be located. If any error is encountered during the process the error message is updated accordingly

◆ clearExistingDetectorsToConsider()

void DetectorLocation::clearExistingDetectorsToConsider ( )

Clears the list of detectors to consider

◆ clearSectionsToAvoid()

void DetectorLocation::clearSectionsToAvoid ( )

Clears the list of sections to avoid

◆ getCandidateSections()

QList< QPair< GKSection *, double > > DetectorLocation::getCandidateSections ( ) const

Gets the list of sections selected by the detection layout algorithm to locate a detector on

◆ getDetectorLocationStatus()

DetectorLocationStatus DetectorLocation::getDetectorLocationStatus ( ) const

◆ getErrorMessage()

const QString & DetectorLocation::getErrorMessage ( ) const

Returns the string that identifies the error detected (if any) during the detection layout calculation

◆ getExistingDetectorsToConsider()

QList< GKDetector * > DetectorLocation::getExistingDetectorsToConsider ( ) const

Gets all the existing detectors considered as a valid detector wanted to be taken into account when executing the detection layout algorithm

◆ getExperiment()

MacroExperiment * DetectorLocation::getExperiment ( ) const

Gets the MacroExperiment where the flows and paths data have been taken from

◆ getMaximumNumberOfDetectorsToCreate()

int DetectorLocation::getMaximumNumberOfDetectorsToCreate ( ) const

Gets the maximum number of detectors that are wanted to be created after executing the detection layout algorithm. If undefined or no limit set then a -1 will be returned

◆ getPercentageOfTripsAchievedWithExistingDetectorsToConsider()

double DetectorLocation::getPercentageOfTripsAchievedWithExistingDetectorsToConsider ( ) const

Gets the percentage of trips covered just with the existing detectors marked as to be considered after executing the detection layout algorithm

◆ getPercentageOfTripsToAchieve()

double DetectorLocation::getPercentageOfTripsToAchieve ( ) const

Gets the maximum percentage of trips wanted to be covered when executing the detection layout algorithm. If undefined or no percentage set then a -1.0 will be returned. If set a value from 0.0 to 100.0 will be returned

◆ getSectionsToAvoid()

QList< GKSection * > DetectorLocation::getSectionsToAvoid ( ) const

Gets the list of sections that cannot be selected as candidates to locate a detector on, when executing the detection layout algorithm

◆ getSectionsWithDetectorCreated()

QList< GKSection * > DetectorLocation::getSectionsWithDetectorCreated ( ) const

Gets the list of sections where detectors have been created after calculating the detection layout

◆ setExperiment()

void DetectorLocation::setExperiment ( MacroExperiment exp)

Sets the MacroExperiment where the flows and paths data will be taken from

◆ setMaximumNumberOfDetectorsToCreate()

void DetectorLocation::setMaximumNumberOfDetectorsToCreate ( int  maxNbDetectors)

Sets the maximum number of detectors that are wanted to be created after executing the detection layout algorithm. If no limit wants to be set then a -1 can be used.

◆ setPercentageOfTripsToAchieve()

void DetectorLocation::setPercentageOfTripsToAchieve ( double  percentage)

Sets the maximum percentage of trips [0.0, 100.0] wanted to be covered when executing the detection layout algorithm. If no percentage wants to be set then a -1.0 can be used.

© Aimsun SLU
Aimsun ®