Aimsun Next Scripting
24.0
|
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 * > ¢roids) |
void | setDestinations (const QVector< GKCentroid * > ¢roids) |
void | setMatrixTrips (GKODMatrix *matrix) |
void | setOriginsTotals (const QVector< double > &) |
void | setDestinationsTotals (const QVector< double > &) |
void | execute () |
GKFurnessResult | getResult () const |
double | getResEpsilon () const |
const GKODMatrix & | getResMatrix () |
int | getNbOrigins () const |
int | getNbDestinations () const |
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 | ( | ) |
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.
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
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
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
const GKODMatrix & GKFurnessOperation::getResMatrix | ( | ) |
It returns the adjusted matrix when it has been calculated or None otherwise.
GKFurnessResult GKFurnessOperation::getResult | ( | ) | const |
It returns the Furness execution result. This result can be:
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.
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
void GKFurnessOperation::setEpsilon | ( | double | ) |
It sets the epsilon value taken into account to execute the Furness algorithm. The default value is 0.01
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
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]
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.
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