Aimsun Next Scripting  24.0
Public Types | Public Member Functions | List of all members
GKFurnessOperation Class Reference

Public Types

enum  GKFurnessResult {
  eSuccess , eNotExecuted , eUndefinedMatrix , eUndefinedOriginTotals ,
  eUndefinedDestinationTotals , eWrongTotals , eFinishedByLMax
}
 

Public Member Functions

 GKFurnessOperation ()
 
 ~GKFurnessOperation ()
 
void setEpsilon (double)
 
void setLMax (int)
 
void setOrigins (const QVector< GKCentroid * > &centroids)
 
void setDestinations (const QVector< GKCentroid * > &centroids)
 
void setMatrixTrips (GKODMatrix *matrix)
 
void setOriginsTotals (const QVector< double > &)
 
void setDestinationsTotals (const QVector< double > &)
 
void execute ()
 
GKFurnessResult getResult () const
 
double getResEpsilon () const
 
const GKODMatrixgetResMatrix ()
 
int getNbOrigins () const
 
int getNbDestinations () const
 

Member Enumeration Documentation

◆ GKFurnessResult

Enumerator
eSuccess 
eNotExecuted 
eUndefinedMatrix 
eUndefinedOriginTotals 
eUndefinedDestinationTotals 
eWrongTotals 
eFinishedByLMax 

Constructor & Destructor Documentation

◆ GKFurnessOperation()

GKFurnessOperation::GKFurnessOperation ( )

The Furness algorithm adjust a given matrix taken into account an epsilon value, a number of maximum iterations and the new total values for each origin centroid and for each destination centroid. Note that the total values for each origin centroid must add up to the same that the total values for each destination centroid

◆ ~GKFurnessOperation()

GKFurnessOperation::~GKFurnessOperation ( )

Member Function Documentation

◆ execute()

void GKFurnessOperation::execute ( )

Executes the Furness function. After calling this function it is needed to call the getResult() function and depending on the result, an adjusted matrix can be obtained directly or Furness may need to be called again.

◆ getNbDestinations()

int GKFurnessOperation::getNbDestinations ( ) const

It returns the number of destination centroids present in the current matrix. It returns 0 if ther is not any matrix defined

◆ getNbOrigins()

int GKFurnessOperation::getNbOrigins ( ) const

It returns the number of origin centroids present in the current matrix. It returns 0 if ther is not any matrix defined

◆ getResEpsilon()

double GKFurnessOperation::getResEpsilon ( ) const

It returns the result epsilon. Note that it is different to the initial epsilon only when the matrix has not been adjusted properly

◆ getResMatrix()

const GKODMatrix & GKFurnessOperation::getResMatrix ( )

It returns the adjusted matrix when it has been calculated or None otherwise.

◆ getResult()

GKFurnessResult GKFurnessOperation::getResult ( ) const

It returns the Furness execution result. This result can be:

  • eNotExecuted: Furness has not been executed yet. There is not any adjusted matrix available.
  • eUndefinedMatrix: Any matrix has been defined to be adjusted.
  • eUndefinedOriginTotals: The origin totals have not been defined.
  • eUndefinedDestinationTotals: The destination totals have not been defined.
  • eSuccess: Furness has been executed successfully. There is an adjusted matrix available.
  • eWrongTotals: The rows' totals and the columns' totals must add up to the same value to be able to execute Furness. There is not an adjusted matrix available.
  • eFinishedByLMax: The matrix cannot be adjusted with these parameters. With the Lmax defined a higher epsilon than the defined has been obtained. The epsilon value can be checked by calling the function getResEpsilon(). Note that there is an adjusted matrix available but calculated with the lmax and resEpsilon parameters.

◆ setDestinations()

void GKFurnessOperation::setDestinations ( const QVector< GKCentroid * > &  centroids)

It sets the destination centroids in the order they are displayed in the editor or in the order they ant to be taken into account.

◆ setDestinationsTotals()

void GKFurnessOperation::setDestinationsTotals ( const QVector< double > &  )

It sets the new totals for each destination centroid of the matrix. That is an array of nbDestinationCentroids positions having each one the total number of trips that will arrive to each destination centroid

◆ setEpsilon()

void GKFurnessOperation::setEpsilon ( double  )

It sets the epsilon value taken into account to execute the Furness algorithm. The default value is 0.01

◆ setLMax()

void GKFurnessOperation::setLMax ( int  )

It sets the LMax value (maximum number of iterations) taken into account to execute the Furness algorithm. The default value is 25

◆ setMatrixTrips()

void GKFurnessOperation::setMatrixTrips ( GKODMatrix matrix)

It sets the matrix that will be adjusted with the Furness algorithm. The matrix will be an array of nbOriginCentroids having each one an array of nbDestinationCentroids doubles, that is double[nbOriginCentroids][nbDestinationCentroids]

◆ setOrigins()

void GKFurnessOperation::setOrigins ( const QVector< GKCentroid * > &  centroids)

It sets the origin centroids in the order they are displayed in the editor or in the order they ant to be taken into account.

◆ setOriginsTotals()

void GKFurnessOperation::setOriginsTotals ( const QVector< double > &  )

It sets the new totals for each origin centroid of the matrix. That is an array of nbOriginCentroids positions having each one the total number of trips that will go out from each origin centroid

© Aimsun SLU
Aimsun ®