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

Public Types

enum  GKODMatrixGroupTripSetting { eByODPair , eEvenlyForAll , eEvenlyForExistingTrips , eProportionalToExistingTrips }
 
enum  GKODMatrixStoreId { eId , eName , eEID }
 
enum  GKODMatrixStoreType { eInternal , eAsciiFile , eODBC , eOracle }
 
enum class  Content {
  trips = 0 , cost = 1 , relativeGap = 2 , blockedCells = 3 ,
  maximumDeviation = 4
}
 
enum class  Unit { vehicles = 0 , individuals = 1 }
 
enum class  CarAvailability { noDistinction = 0 , carAvailable = 1 , noCarAvailable = 2 }
 
enum class  AssignmentOutput {
  none = 0 , totalCost = 1 , travelTime = 2 , distance = 3 ,
  junctionDelay = 4 , walkingTime = 5 , waitingTime = 6 , fare = 7 ,
  inVehicleTime = 8 , crowdDiscomfort = 9 , transferPenalty = 10
}
 
- 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

 GKODMatrix ()
 
GKODMatrix operator* (double iScale) const
 
GKODMatrix operator* (const GKODMatrix &iMatrix) const
 
GKODMatrix operator/ (const GKODMatrix &iMatrix) const
 
GKODMatrix operator+ (const GKODMatrix &iMatrix) const
 
GKODMatrix operator- (const GKODMatrix &iMatrix) const
 
bool ensureMatrixData (const QUuid &documentUUID=QUuid()) const
 
bool requiresExternalRestore () const
 
void storeExternalMatrix ()
 
bool restoreExternalMatrix ()
 
void setCentroidConfiguration (GKCentroidConfiguration *)
 
GKCentroidConfigurationgetCentroidConfiguration () const
 
void setTrips (GKCentroid *from, GKCentroid *to, double trips)
 
void setTrips (GKGroup *from, GKGroup *to, double trips, GKODMatrixGroupTripSetting tripSetting=eByODPair)
 
void setTrips (uint from, uint to, double trips)
 
void addTrips (const GKCentroid *from, const GKCentroid *to, double trips)
 
void addTrips (uint from, uint to, double trips)
 
void setTripsFromList (const QList< QList< double > > &list)
 
double getTrips (GKCentroid *from, GKCentroid *to) const
 
double getInternalTrips (const GKCentroid *from, const GKCentroid *to, bool ensureMatrix) const
 
double getTrips (GKGroup *from, GKGroup *to) const
 
double getTrips (uint from, uint to) const
 
double getTripsByOrigin (GKCentroid *from) const
 
double getTripsByDestination (GKCentroid *to) const
 
bool anyTripsByOrigin (GKCentroid *from) const
 
bool anyTripsByDestination (GKCentroid *to) const
 
double getTotalTrips () const
 
QList< QList< double > > getTripsToList () const
 
void removeTrips ()
 
void setTripsFromMatrix (GKODMatrix *_matrix)
 
bool hasNegativeValues () const
 
void setRoutePercentage (const GKODRoute *route, float percentage)
 
float getRoutePercentage (const GKODRoute *route) const
 
void clearRoutesPercentages ()
 
const QMap< const GKODRoute *, float > & getRoutes () const
 
void setICSPPercentage (const GKCentroid *from, const GKCentroid *to, float)
 
float getICSPPercentage (const GKCentroid *from, const GKCentroid *to)
 
void clearICSPPercentage ()
 
bool hasICSP () const
 
void setStoreId (const GKODMatrixStoreId &value)
 
const GKODMatrixStoreId getStoreId () const
 
void setStoreType (const GKODMatrixStoreType &value)
 
const GKODMatrixStoreType getStoreType () const
 
void setLocation (const QString &)
 
const QString getLocation () const
 
void setExtraLocationData (const QString &)
 
const QString getExtraLocationData () const
 
void setEnableStore (bool value)
 
bool getEnableStore () const
 
void compress ()
 
void descompress ()
 
bool isCompressed () const
 
void lerp (const GKODMatrix &m1, const GKODMatrix &m2, double f)
 
void multiply (double f)
 
void setValueToAllCells (double f, bool includingDiagonal=false)
 
void setMatrixDense ()
 
- Public Member Functions inherited from GKTrafficDemandItem
 GKTrafficDemandItem ()
 
GKProblemNetgetProblemNet () const
 
void setProblemNet (GKProblemNet *)
 
GKUserClassgetUserClass () const
 
void setUserClass (GKUserClass *userClass)
 
GKMobileAgentgetVehicle () const
 
void setVehicle (GKMobileAgent *avehicle)
 
void setInterval (const QTime &, const GKTimeDuration &)
 
void setFrom (const QTime &)
 
void setDuration (const GKTimeDuration &)
 
const QTime & getFrom () const
 
const GKTimeDurationgetDuration () const
 
bool equivalent (const GKTrafficDemandItem &) const
 
bool equivalent (const GKUserClass *uc, const QTime &, const GKTimeDuration &) const
 
QString getNameAutomatically (bool) 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
 

Static Public Attributes

static uint originalTSAtt
 
static uint timeIntervalAtt
 
static uint Contents
 
static uint Units
 
static uint transportationModesAtt
 
static uint Purpose
 
static uint carAvailabilityAtt
 
static uint Component
 
static uint AssignmentOutputs
 
- Static Public Attributes inherited from GKTrafficDemandItem
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 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 Attributes inherited from GKBaseObject
ConvertToSubClassCode Py_BEGIN_ALLOW_THREADS GKBaseObjectbase = (GKBaseObject*)sipCpp
 
 sipType = 0
 

Detailed Description

This class holds the trips from origin to destination for a particular vehicle type and for a specific time interval.

Centroids in the matrix pertains to the controid configuration where the matrix is. To access or set the trip information by centroids never use the catalog to get the centroids (as it will return all the centroids no matter the configuration) but instead the centroid configuration (GKCentroidConfiguration::getCentroids).

Member Enumeration Documentation

◆ AssignmentOutput

enum class GKODMatrix::AssignmentOutput
strong
Enumerator
none 
totalCost 
travelTime 
distance 
junctionDelay 
walkingTime 
waitingTime 
fare 
inVehicleTime 
crowdDiscomfort 
transferPenalty 

◆ CarAvailability

enum class GKODMatrix::CarAvailability
strong
Enumerator
noDistinction 
carAvailable 
noCarAvailable 

◆ Content

enum class GKODMatrix::Content
strong
Enumerator
trips 
cost 
relativeGap 
blockedCells 
maximumDeviation 

◆ GKODMatrixGroupTripSetting

OD grouping trip setting type:

  • eByODPair: set given value to each OD pair belonging to the groupings
  • eEvenlyForAll: split given value evenly for all OD pairs belonging to the grupings
  • eEvenlyForExistingTrips: split given value evenly for all OD pairs with a positive number of trips
  • eProportionalToExistingTrips: split given value proportionally for all OD pairs with a positive number of trips
Enumerator
eByODPair 
eEvenlyForAll 
eEvenlyForExistingTrips 
eProportionalToExistingTrips 

◆ GKODMatrixStoreId

When storing the OD in an external source which attribute is used as the ID

Enumerator
eId 
eName 
eEID 

◆ GKODMatrixStoreType

OD storage type:

  • eInternal: in the Aimsun database
  • eAsciiFile: in an ASCII file
  • eODBC: in a ODBC database using the GKModel::getDatabase settings.
  • eOracle: in a Oracle database using the GKModel::getDatabase settings.
Enumerator
eInternal 
eAsciiFile 
eODBC 
eOracle 

◆ Unit

enum class GKODMatrix::Unit
strong
Enumerator
vehicles 
individuals 

Constructor & Destructor Documentation

◆ GKODMatrix()

GKODMatrix::GKODMatrix ( )

Member Function Documentation

◆ addTrips() [1/2]

void GKODMatrix::addTrips ( const GKCentroid from,
const GKCentroid to,
double  trips 
)

Adds the trip to trips that goes from "from" to "to". Both centroids must be part of the centroid configuration in where this matrix is.

◆ addTrips() [2/2]

void GKODMatrix::addTrips ( uint  from,
uint  to,
double  trips 
)

Adds the trip to trips that goes from "from" to "to" centroid indexes. Both centroid indexes must be part of the centroid configuration in where this matrix is.

◆ anyTripsByDestination()

bool GKODMatrix::anyTripsByDestination ( GKCentroid to) const

Returns true if is any trip to a destination from all the origin centroids. Note: This function is thread safe.

◆ anyTripsByOrigin()

bool GKODMatrix::anyTripsByOrigin ( GKCentroid from) const

Returns true if is any trip from an origin to all the destination centroids. Note: This function is thread safe.

◆ clearICSPPercentage()

void GKODMatrix::clearICSPPercentage ( )

Clears the Initially Calculated Shortest Paths Percentage

◆ clearRoutesPercentages()

void GKODMatrix::clearRoutesPercentages ( )

Removes all the routes use.

◆ compress()

void GKODMatrix::compress ( )

Compress this matrix.

◆ descompress()

void GKODMatrix::descompress ( )

Decompress this matrix.

◆ ensureMatrixData()

bool GKODMatrix::ensureMatrixData ( const QUuid &  documentUUID = QUuid()) const

Ensures that the matrix has data. In case the matrix is externaly stored it restores the content.

Returns false if data cannot be restored.

◆ getCentroidConfiguration()

GKCentroidConfiguration * GKODMatrix::getCentroidConfiguration ( ) const

Get the centroid configuration.

◆ getEnableStore()

bool GKODMatrix::getEnableStore ( ) const

If true the OD is saved when saving the network, if false the OD is not saved (it is read only from Aimsun Next point of view).

◆ getExtraLocationData()

const QString GKODMatrix::getExtraLocationData ( ) const

Gets extra data needed by the external storer (if any). The string format is "Separator@Format".

◆ getICSPPercentage()

float GKODMatrix::getICSPPercentage ( const GKCentroid from,
const GKCentroid to 
)

Gets the Initially Calculated Shortest Paths Percentage

◆ getInternalTrips()

double GKODMatrix::getInternalTrips ( const GKCentroid from,
const GKCentroid to,
bool  ensureMatrix 
) const

Returns the number of trips from an origin to a destination centroid. Note that if from is not a valid origin or to a valid destination then 0 is returned (no trips). Ensure Matrix is optional in this case.

◆ getLocation()

const QString GKODMatrix::getLocation ( ) const

When storing this OD in a file, its path.

◆ getRoutePercentage()

float GKODMatrix::getRoutePercentage ( const GKODRoute route) const

Gets the percenatge usage of a route. It returns 0 if the route is not used.

◆ getRoutes()

const QMap< const GKODRoute *, float > & GKODMatrix::getRoutes ( ) const

Gets the list of routes in this OD matrix.

◆ getStoreId()

const GKODMatrixStoreId GKODMatrix::getStoreId ( ) const

When storing the OD in an external source which attribute is used as the ID

◆ getStoreType()

const GKODMatrixStoreType GKODMatrix::getStoreType ( ) const

OD storage type:

  • eInternal: in the Aimsun database
  • eAsciiFile: in an ASCII file
  • eODBC: in a ODBC database using the GKModel::getDatabase settings.
  • eOracle: in a Oracle database using the GKModel::getDatabase settings.

◆ getTotalTrips()

double GKODMatrix::getTotalTrips ( ) const

Returns the total number of trips in this matrix.

◆ getTrips() [1/3]

double GKODMatrix::getTrips ( GKCentroid from,
GKCentroid to 
) const

Returns the number of trips from an origin to a destination centroid. Note that if from == to or from is not a valid origin or to a valid destination then -1 is returned (no trips)

◆ getTrips() [2/3]

double GKODMatrix::getTrips ( GKGroup from,
GKGroup to 
) const

Returns the number of trips from an origin group of centroid to a destination group of centroid.

◆ getTrips() [3/3]

double GKODMatrix::getTrips ( uint  from,
uint  to 
) const

Returns the number of trips from an origin to a destination centroid using the centroid index as returned by GKODMatrix::indexOfCentroid Note that if from is not a valid origin or to a valid destination then 0 is returned (no trips)

◆ getTripsByDestination()

double GKODMatrix::getTripsByDestination ( GKCentroid to) const

Returns the number of trips to a destination from all the origin centroids. Note that if to is not a valid destination then -1 is returned (no trips)

◆ getTripsByOrigin()

double GKODMatrix::getTripsByOrigin ( GKCentroid from) const

Returns the number of trips from an origin to all the destination centroids. Note that if from is not a valid origin then -1 is returned (no trips)

◆ getTripsToList()

QList< QList< double > > GKODMatrix::getTripsToList ( ) const

◆ hasICSP()

bool GKODMatrix::hasICSP ( ) const

Returns true if this matrix has any Initially Calculated Shortest Paths Percentage data

◆ hasNegativeValues()

bool GKODMatrix::hasNegativeValues ( ) const

The matrix has negative values.

◆ isCompressed()

bool GKODMatrix::isCompressed ( ) const

Returns true the matrix is currently compressed

◆ lerp()

void GKODMatrix::lerp ( const GKODMatrix m1,
const GKODMatrix m2,
double  f 
)

Lerp: set this as returns (1-f)*m1 + m2*f.

◆ multiply()

void GKODMatrix::multiply ( double  f)

Multiply this matrix by a factor.

◆ operator*() [1/2]

GKODMatrix GKODMatrix::operator* ( const GKODMatrix iMatrix) const

◆ operator*() [2/2]

GKODMatrix GKODMatrix::operator* ( double  iScale) const

◆ operator+()

GKODMatrix GKODMatrix::operator+ ( const GKODMatrix iMatrix) const

◆ operator-()

GKODMatrix GKODMatrix::operator- ( const GKODMatrix iMatrix) const

◆ operator/()

GKODMatrix GKODMatrix::operator/ ( const GKODMatrix iMatrix) const

◆ removeTrips()

void GKODMatrix::removeTrips ( )

Removes all trips from this matrix.

◆ requiresExternalRestore()

bool GKODMatrix::requiresExternalRestore ( ) const

Returns true if the matrix data is not yet in memory

◆ restoreExternalMatrix()

bool GKODMatrix::restoreExternalMatrix ( )

Restores the matrix data (trips) from an external source. Called automatically by GKODMatrix::restore. Can be used to force a restore from python or SDK.

Returns false if data cannot be restored.

This function is deprecated. Use GKODMatrix::ensureMatrixData instead

◆ setCentroidConfiguration()

void GKODMatrix::setCentroidConfiguration ( GKCentroidConfiguration )

Set (when created) the centroid configuration of this matrix.

◆ setEnableStore()

void GKODMatrix::setEnableStore ( bool  value)

If true the OD is saved when saving the network, if false the OD is not saved (it is read only from Aimsun Next point of view).

◆ setExtraLocationData()

void GKODMatrix::setExtraLocationData ( const QString &  )

Sets extra data needed by the external storer (if any). Info is the separator (TAB, comma) and Format (Aimsun, VISUM, EMME, SATURN, AimsunBinary), separated by . That is, the string format is "Separator@Format". For example, valid strings are "@Aimsun" for TAB, ",@Aimsun" for comma separator, both with Aimsun Next format.

◆ setICSPPercentage()

void GKODMatrix::setICSPPercentage ( const GKCentroid from,
const GKCentroid to,
float   
)

Sets the Initially Calculated Shortest Paths Percentage

◆ setLocation()

void GKODMatrix::setLocation ( const QString &  )

When storing this OD in a file, its path.

◆ setMatrixDense()

void GKODMatrix::setMatrixDense ( )

Change matrix internal structure to dense. Obtain an increase of write/read speed using more memory.

◆ setRoutePercentage()

void GKODMatrix::setRoutePercentage ( const GKODRoute route,
float  percentage 
)

Sets the percentage usage of a route in this OD matrix. If percentage is 0.0 then the rute will be removed from this matrix. No check is done to ensure that the sum of all the possible percentages are between [0 and 100] for a pair of origin and destination centroids.

◆ setStoreId()

void GKODMatrix::setStoreId ( const GKODMatrixStoreId value)

When storing the OD in an external source which attribute is used as the ID

◆ setStoreType()

void GKODMatrix::setStoreType ( const GKODMatrixStoreType value)

OD storage type:

  • eInternal: in the Aimsun database
  • eAsciiFile: in an ASCII file
  • eODBC: in a ODBC database using the GKModel::getDatabase settings.
  • eOracle: in a Oracle database using the GKModel::getDatabase settings.

◆ setTrips() [1/3]

void GKODMatrix::setTrips ( GKCentroid from,
GKCentroid to,
double  trips 
)

Sets the trip that goes from "from" to "to". Both centroids must be part of the centroid configuration in where this matrix is.

◆ setTrips() [2/3]

void GKODMatrix::setTrips ( GKGroup from,
GKGroup to,
double  trips,
GKODMatrixGroupTripSetting  tripSetting = eByODPair 
)

Sets the trips for all centroids in the "from" group to the "to" group.

◆ setTrips() [3/3]

void GKODMatrix::setTrips ( uint  from,
uint  to,
double  trips 
)

Sets the trip that goes from "from" to "to" centroid indexes. Both centroid indexes must be part of the centroid configuration in where this matrix is.

◆ setTripsFromList()

void GKODMatrix::setTripsFromList ( const QList< QList< double > > &  list)

◆ setTripsFromMatrix()

void GKODMatrix::setTripsFromMatrix ( GKODMatrix _matrix)

Acts the trips for this matrix with the ones that matrix has defined. Note that both matrices have to belong to the same centroid configuration

◆ setValueToAllCells()

void GKODMatrix::setValueToAllCells ( double  f,
bool  includingDiagonal = false 
)

Set the same value to all cells except the diagonal unless the includingDiagonal is set to True.

◆ storeExternalMatrix()

void GKODMatrix::storeExternalMatrix ( )

Stores the matrix data (trips) from an external source. Called automatically by GKODMatrix::store. Can be used to force a store from python or SDK.

Member Data Documentation

◆ AssignmentOutputs

uint GKODMatrix::AssignmentOutputs
static

Matrix Assigment output (component): Points to Matrix component in case of using one of the components defined below in the assignmentOutput enum [1,10]. This column is only activated if the column GKODMatrix::component is defined as 0: No GKFunctionComponent selected in the component column.

◆ carAvailabilityAtt

uint GKODMatrix::carAvailabilityAtt
static

Matrix Car Availability

◆ Component

uint GKODMatrix::Component
static

Matrix Component: Points to Matrix component in case of using a defined GKFunctionComponent. Can include one of the GKFunctionComponent included by the user.

◆ Contents

uint GKODMatrix::Contents
static

Matrix Content

◆ originalTSAtt

uint GKODMatrix::originalTSAtt
static

When the matrix has been adjusted, the ID of the real data set used

◆ Purpose

uint GKODMatrix::Purpose
static

Matrix Purpose

◆ timeIntervalAtt

uint GKODMatrix::timeIntervalAtt
static

When the matrix has been adjusted, the interval in minutes

◆ transportationModesAtt

uint GKODMatrix::transportationModesAtt
static

Matrix Transportation Modes

◆ Units

uint GKODMatrix::Units
static

Matrix Unit

© Aimsun SLU
Aimsun ®