Skip to content

Updating Scripts For Newer Versions

Aimsun Next 22.0.1 changes

The following is a list of all the functions that have changed or have been added after the release of Aimsun Next 22.0.0 Final Release. The classes with changes are:

MacroDepartureAdjustmentOutput Class

createWarmupTrafficDemand

The following function has been added to generate just the warm-up demand:

    GKTrafficDemand * createWarmupTrafficDemand() const;

GKFunctionCost Class

evaluateAdjustmentWeight

The signature of this function has been changed from:

    double evaluateAdjustmentWeight(  double observed );
to:
    double evaluateAdjustmentWeight( const GKFunctionCostContext* context, const double observed );

GKFunctionCostContext Class

  • The class GKFunctionCostContext now includes an iteration field which contains the static assignment iteration at which the function is being evaluated.

CMacroStatsManager Class

The following functions have been added to provide all the users and vehicles used in the stats:

getUsers function
    QVector< GKUserClass* >     getUsers() const;
getVehicles function
    QVector< GKVehicle* >       getVehicles() const;

The following functions have been added to give access to all the statistics of this class:

getSectionVolume function
    double          getSectionVolume( const GKUserClass * iUserClass, const GKSection& iSection) const;
getSectionVehicleVolume function
    double          getSectionVehicleVolume( const GKVehicle * iVehicle, const GKSection& iSection ) const;
getSectionOccupancy function
    double          getSectionOccupancy( const GKUserClass * iUserClass, const GKSection& iSection) const;
getSectionCost function
    double          getSectionCost( const GKUserClass * iUserClass, const GKSection& iSection) const;
getSectionCostComponent function
    double          getSectionCostComponent( const GKUserClass * iUserClass, const GKSection& iSection, const GKFunctionComponent& iComponent ) const;
getTurningVolume function
    double          getTurningVolume( const GKUserClass * iUserClass, const GKTurning& iTurning ) const;
getTurningVehicleVolume function
    double          getTurningVehicleVolume( const GKVehicle * iVehicle, const GKTurning& iTurning ) const;
getTurningPercentage function
    double          getTurningPercentage( const GKUserClass * iUserClass, const GKTurning& iTurning ) const;
getTurningCost function
    double          getTurningCost( const GKUserClass * iUserClass, const GKTurning& iTurning ) const;
getTurningCostComponent function
    double          getTurningCostComponent( const GKUserClass * iUserClass, const GKTurning& iTurning, const GKFunctionComponent& iComponent ) const;
getTrajectoryVolume function
    double          getTrajectoryVolume( const GKUserClass * iUserClass, const GKSuperNodeTrajectory& iTrajectory ) const;
getTrajectoryVehicleVolume function
    double          getTrajectoryVehicleVolume( const GKVehicle * iVehicle, const GKSuperNodeTrajectory& iTrajectory ) const;
getTrajectoryPercentage function
    double          getTrajectoryPercentage( const GKUserClass * iUserClass, const GKSuperNodeTrajectory& iTrajectory ) const;
getTrajectoryCost function
    double          getTrajectoryCost( const GKUserClass * iUserClass, const GKSuperNodeTrajectory& iTrajectory ) const;
getTrajectoryCostComponent function
    double          getTrajectoryCostComponent( const GKUserClass * iUserClass, const GKSuperNodeTrajectory& iTrajectory, const GKFunctionComponent& iComponent ) const;
getConnectionVolume function
    double          getConnectionVolume( const GKUserClass * iUserClass, const GKCenConnection& iConnection ) const;
getConnectionVehicleVolume function
    double          getConnectionVehicleVolume( const GKVehicle * iVehicle, const GKCenConnection& iConnection ) const;
getConnectionCost function
    double          getConnectionCost( const GKUserClass * iUserClass, const GKCenConnection& iConnection ) const;
getConnectionCostComponent function
    double          getConnectionCostComponent( const GKUserClass * iUserClass, const GKCenConnection& iConnection, const GKFunctionComponent& iComponent ) const;
getRouteVolume function
    double          getRouteVolume( const GKUserClass * iUserClass, const GKRoute& iRoute ) const;
getRouteVehicleVolume function
    double          getRouteVehicleVolume( const GKVehicle * iVehicle, const GKRoute& iRoute ) const;
getRouteCost function
    double          getRouteCost( const GKUserClass * iUserClass, const GKRoute& iRoute ) const;
getRouteCostComponent function
    double          getRouteCostComponent( const GKUserClass * iUserClass, const GKRoute& iRoute, const GKFunctionComponent& iComponent ) const;
getDetectorVolume function
    double          getDetectorVolume( const GKUserClass * iUserClass, const GKDetector& iDetector ) const;
getDetectorVehicleVolume function
    double          getDetectorVehicleVolume( const GKVehicle * iVehicle, const GKDetector& iDetector ) const;

MacroPTAdjustmentResult Class

The following functions have been added to give access to the demand adjusted via scripting:

getUsers function
    QVector<GKUserClass*>   getUsers() const;
publishAdjustedDemand function
    GKTrafficDemand *       publishAdjustedDemand( GKModel *iModel );
publishMatrix function
    GKODMatrix *            publishMatrix(GKUserClass * iUser , bool iCreateInModel) const;

MacroPTStatsView Class

The following methods have been added in order to obtain the statistics from Centroids and Centroid Connectors:

getCentroidAccess function
    double getCentroidAccess( const GKUserClass* iUserClass, const GKCentroid& iCentroid ) const;
getCentroidEgress function
double getCentroidEgress( const GKUserClass* iUserClass, const GKCentroid& iCentroid ) const;
getCentroidWalkOnlyAccess function
    double getCentroidWalkOnlyAccess( const GKUserClass* iUserClass, const GKCentroid& iCentroid ) const;
getCentroidWalkOnlyEgress function
    double getCentroidWalkOnlyEgress( const GKUserClass* iUserClass, const GKCentroid& iCentroid ) const;
getConnectionLoad function
    double getConnectionLoad( const GKUserClass* iUserClass, const GKCenConnection& iConnection ) const;
getConnectionAccess function
    double getConnectionAccess( const GKUserClass* iUserClass, const GKCenConnection& iConnection ) const;
getConnectionEgress function
    double getConnectionEgress( const GKUserClass* iUserClass, const GKCenConnection& iConnection ) const;
getConnectionWalkOnlyAccess function
    double getConnectionWalkOnlyAccess( const GKUserClass* iUserClass, const GKCenConnection& iConnection ) const;
getConnectionWalkOnlyEgress function
    double getConnectionWalkOnlyEgress( const GKUserClass* iUserClass, const GKCenConnection& iConnection ) const;

MacroPTPlugin Class

The following column ids have been added in order to collect the statistics of Walking-Only Access and Walking-Only Egress in GKColumns:

ePTWalkOnlyAccess
const QString ePTWalkOnlyAccess;
ePTWalkOnlyEgress
const QString ePTWalkOnlyEgress;

GKGenerationAttractionDataSet Class

The following function has been added to give access to the external data contained in the class:

getExternalData
QVector<ExternalData>       getExternalData( const GKCentroid* centroid ) const;

GKScriptNewCmd Class

Now it is possible to create different types of GKScript objects using the following function:

void setObjectType( GKScript::ScriptType type );
  • type param can be one of the following options, enum ScriptType{ eBasic, ePrePost, eFourStep }. If not specified the object will be created as GKScript::eBasic.

GKSection Class

The following function has been added to extract lane contour points:

getExtremePointsLane function
GKPoints getExtremePointsLane( uint lanepos ) const;

Aimsun Next 22 changes

The following is a list of all the functions that have changed between Aimsun Next 20 and Aimsun Next 22 in order to help update old scripts easily. The classes with changes are:

GKModel Class

setActiveExperimentId function

Function name changed:

void setActiveExperimentId( quint32 id );
to
void setActiveExperiment( GKGenericExperiment* experiment );

getActiveExperimentId function

Function name changed:

quint32 getActiveExperimentId() const;
to
GKGenericExperiment* getActiveExperiment() const;

setActiveReplicationId function

Function name changed:

void setActiveReplicationId( quint32 id );
to
void setActiveReplication( const GKReplication* replication );

getActiveReplicationId function

Function name changed:

quint32 getActiveReplicationId() const;
to
GKReplication* getActiveReplication() const;

ModalSplitScenario Class

setDataSet function

Function signature has changed from:

void setDataSet( quint32 id );
to

void setDataSet( GKDistributionDataSet * dataSet );
getComponentSkim function

Function signature has changed from:

GKODMatrix* getComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent ) const;
to

GKODMatrix* getComponentSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const GKFunctionComponent* iComponent ) const;
setComponentSkim function

Function signature has changed from:

void setComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent, GKODMatrix& iSkim );
to

void setComponentSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const GKFunctionComponent* iComponent, GKODMatrix* iSkim );
removeComponentSkim function

Function signature has changed from:

void removeComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent );
to

void removeComponentSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const GKFunctionComponent* iComponent );
getUserDefinedSkim function

Function signature has changed from:

GKODMatrix* getUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex ) const;
to

GKODMatrix* getUserDefinedSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const uint iColumnIndex ) const;
setUserDefinedSkim function

Function signature has changed from:

void setUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex, GKODMatrix& iSkim );
to

void setUserDefinedSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const uint iColumnIndex, GKODMatrix* iSkim );
removeUserDefinedSkim function

Function signature has changed from:

void removeUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex );
to

void removeUserDefinedSkim( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode, const uint iColumnIndex );
getAllSkims function

Function signature has changed from:

QVector<GKODMatrix*> getAllSkims( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode ) const;
to

QVector<GKODMatrix*> getAllSkims( const GKODMatrix* iTripMatrix, const GKTransportationMode* iMode ) const;

ModalSplitOutput Class

getTripPurposes function

Function signature has changed from:

QVector< GKTripPurpose* > getTripPurposes( GKModel * model ) const;
to
QVector< GKTripPurpose* > getTripPurposes() const;

getVehicles function

Function signature has changed from:

QVector<const GKMobileAgent*> getVehicles( GKModel * model ) const;
to
QVector<const GKMobileAgent*> getVehicles() const;

getUsers function

Function signature has changed from:

QVector< GKUserClass * > getUsers( GKModel * model ) const;
to
QVector< GKUserClass * > getUsers() const;

getModalSplit function

Function signature has changed from:

double getModalSplit( GKModel * model, GKTripPurpose * purpose, const GKMobileAgent * vehicle ) const;
to
double getModalSplit( GKTripPurpose * purpose, const GKMobileAgent * vehicle ) const;

getTimePeriod function

Function signature has changed from:

GKTimePeriod * getTimePeriod( GKModel * model ) const;
to
GKTimePeriod * getTimePeriod() const;

ModalSplitTripMatricesUtil Class

tripMatrices function

Function signature has changed from:

QList<quint32> tripMatrices() const;
to

QList<const GKODMatrix*> tripMatrices() const;
usedTripMatrices function

Function signature has changed from:

const QSet<quint32> & usedTripMatrices() const;
to

QList<const GKODMatrix*> usedTripMatrices() const;
tripMatrixData function

Function signature has changed from:

GKLandUseModesUtil tripMatrixData( quint32 iTripMatrix ) const;
to

GKLandUseModesUtil tripMatrixData( const GKODMatrix* matrix ) const;
setUsedTripMatrices function

Function signature has changed from:

void setUsedTripMatrices( const QSet<quint32> &iUsedTripMatrices );
to

void setUsedTripMatrices( const QVector<GKODMatrix*> &iUsedTripMatrices );
modes function

Functions:

QList<quint32> modes() const;
QList<quint32> modes( quint32 iTripMatrix ) const;
are replaced by

QList<GKTransportationMode*> modes() const;

DistributionScenario Class

getSkim function

Function signature has changed from:

GKODMatrix* getSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType ) const;
to

GKODMatrix* getSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode ,  const SkimType& type ) const;
setSkim function

Function signature has changed from:

void setSkim(const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode , GKODMatrix &iSkim );
to
void setSkim(const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode , GKODMatrix *iSkim );

removeSkim function

Function signature has changed from:

void removeSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType );
to
void removeSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode ,  const SkimType& type  );

getComponentSkim function

Function signature has changed from:

GKODMatrix* getComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent ) const;
to
GKODMatrix* getComponentSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const GKFunctionComponent* iComponent ) const;

setComponentSkim function

Function signature has changed from:

void setComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent, GKODMatrix& iSkim );
to
void setComponentSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const GKFunctionComponent* iComponent, GKODMatrix* iSkim );

removeComponentSkim function

Function signature has changed from:

void removeComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent );
to
void removeComponentSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const GKFunctionComponent* iComponent );   

getUserDefinedSkim function

Function signature has changed from:

GKODMatrix* getUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex ) const;
to
GKODMatrix* getUserDefinedSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const uint iColumnIndex ) const;

setUserDefinedSkim function

Function signature has changed from:

void setUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex, GKODMatrix& iSkim );
to
void setUserDefinedSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const uint iColumnIndex, GKODMatrix* iSkim );

removeUserDefinedSkim function

Function signature has changed from:

void removeUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex );
to
void removeUserDefinedSkim( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode, const uint iColumnIndex );

getAllSkims function

Function signature has changed from:

QVector<GKODMatrix*> getAllSkims( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ) const;s
to
QVector<GKODMatrix*> getAllSkims( const GKGenerationAttractionVector* iGAVector , const GKTransportationMode* iMode ) const;

GravityModelParams Class

setDeterrenceFunctionId function

Function changed from:

void setDeterrenceFunctionId(qint32 iDeterrenceFunctionId);
to

void setDeterrenceFunction( GKFunctionCost* iDeterrenceFunction );
getDeterrenceFunctionId function

Function changed from:

qint32  getDeterrenceFunctionId() const;
to

GKFunctionCost*  getDeterrenceFunction() const;

GKLandUseModesUtil Class

setObject function

Function signature has changed from:

void setObject( quint32 iObject );
to
void setObject( const GKObject* iObject );

object function

Function signature has changed from:

quint32 object() const;
to
const GKObject* object() const;

addMode function

Function signature has changed from:

void addMode( quint32 iMode );
to
void addMode( const GKTransportationMode* iMode );

contains function

Function signature has changed from:

bool contains( quint32 iMode ) const;
to
bool contains( const GKTransportationMode* iMode ) const;

modes function

Function signature has changed from:

QList<quint32> modes() const;
to
QVector<GKLandUseSkimMatricesUtil> modes() const;

addMacroComponent function

Function signature has changed from:

void addMacroComponent( quint32 iMacroComponentId );
to
void addMacroComponent( const GKFunctionComponent* component );

skims function

Function signature has changed from:

GKLandUseSkimMatricesUtil skims( quint32 iMode ) const;
to
GKLandUseSkimMatricesUtil skims( const GKTransportationMode * iMode ) const;

GKLandUseSkimMatricesUtil Class

transportationMode function

Function signature has changed from:

quint32 transportationMode() const;
to
const GKTransportationMode* transportationMode() const;

setCostSkim function

Function signature has changed from:

void setCostSkim( const quint32 &iSkim );
to
void setCostSkim( const GKODMatrix *iSkim );

costSkim function

Function signature has changed from:

const quint32 & costSkim() const;
GKODMatrix * costSkim( GKModel *iModel ) const;
to
GKODMatrix * costSkim() const;

setDistanceSkim function

Function signature has changed from:

void setDistanceSkim( const quint32 &iSkim );
to
void setDistanceSkim( const GKODMatrix *iSkim );

distanceSkim function

Functions:

const quint32 & distanceSkim() const;
GKODMatrix * distanceSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * distanceSkim() const;

setTravelTimeSkim function

Function signature has changed from:

void setTravelTimeSkim( const quint32 &iSkim );
to
void setTravelTimeSkim( const GKODMatrix *iSkim );

travelTimeSkim function

Functions:

const quint32 & travelTimeSkim() const;
GKODMatrix * travelTimeSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * travelTimeSkim() const;

travelTimeSkim function

Functions:

const quint32 & travelTimeSkim() const;
GKODMatrix * travelTimeSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * travelTimeSkim() const;

setInVehicleTimeSkim function

Function signature has changed from:

void setInVehicleTimeSkim( const quint32 &iSkim );
to
void setInVehicleTimeSkim( const GKODMatrix *iSkim );

inVehicleTimeSkim function

Functions:

const quint32 & inVehicleTimeSkim() const;
GKODMatrix * inVehicleTimeSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * inVehicleTimeSkim() const;

setWaitingTimeSkim function

Function signature has changed from:

void setWaitingTimeSkim( const quint32 &iSkim );
to
void setWaitingTimeSkim( const GKODMatrix *iSkim );

waitingTimeSkim function

Functions:

const quint32 & waitingTimeSkim() const;
GKODMatrix * waitingTimeSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * waitingTimeSkim() const;

setWalkingTimeSkim function

Function signature has changed from:

void setWalkingTimeSkim( const quint32 &iSkim );
to
void setWalkingTimeSkim( const GKODMatrix *iSkim );

walkingTimeSkim function

Functions:

const quint32 & walkingTimeSkim() const;
GKODMatrix * walkingTimeSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * walkingTimeSkim() const;

setTransferPenaltySkim function

Function signature has changed from:

void setTransferPenaltySkim( const quint32 &iSkim );
to
void setTransferPenaltySkim( const GKODMatrix *iSkim );

transferPenaltySkim function

Functions:

const quint32 & transferPenaltySkim() const;
GKODMatrix * transferPenaltySkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * transferPenaltySkim() const;

setFareSkim function

Function signature has changed from:

void setFareSkim( const quint32 &iSkim );
to
void setFareSkim( const GKODMatrix *iSkim );

fareSkim function

Functions:

const quint32 & fareSkim() const;
GKODMatrix * fareSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * fareSkim() const;

setCrowdDiscomfortSkim function

Function signature has changed from:

void setCrowdDiscomfortSkim( const quint32 &iSkim );
to
void setCrowdDiscomfortSkim( const GKODMatrix *iSkim );

crowdDiscomfortSkim function

Functions

const quint32 & crowdDiscomfortSkim() const;
GKODMatrix * crowdDiscomfortSkim( GKModel *iModel ) const;
are replaced by
GKODMatrix * crowdDiscomfortSkim() const;

addMacroComponent function

Function signature has changed from:

void addMacroComponent( quint32 iMacroComponentId );
to
void addMacroComponent( const GKFunctionComponent* component );

setMacroComponentSkim function

Function signature has changed from:

void setMacroComponentSkim( quint32 iMacroComponentId, quint32 iSkim );
to
void setMacroComponentSkim( const GKFunctionComponent* component, const GKODMatrix* iSkim );

macroComponentSkim function

Function signature has changed from:

quint32 macroComponentSkim( quint32 iMacroComponentId ) const;
to
GKODMatrix* macroComponentSkim( const GKFunctionComponent* component ) const;

setUserDefinedSkim function

Function signature has changed from:

void setUserDefinedSkim( int index, quint32 iSkim );
to
void setUserDefinedSkim( int index, const GKODMatrix* iSkim );

userDefinedSkims function

Function signature has changed from:

const QList<quint32> & userDefinedSkims() const;
to
QList<const GKODMatrix*> userDefinedSkims() const;

SkimDataProvider Class

The enum type SkimType has been moved outside of this class into the generic namespace. Now it is defined in the GKLandUseSkimMatricesUtil.Two more options have been added (eFirst, eTotalTypes) to ease the iterations over the different types of skim. From:

enum SkimType{ eCost=0, eDistance, eTravelTime, eInVehicleTime, eWaitingTime, eWalkingTime, eTransferPenalty, eFare, eCrowdDiscomfort };
To:
enum SkimType{ eFirst = 0, eCost=0, eDistance, eTravelTime, eInVehicleTime, eWaitingTime, eWalkingTime, eTransferPenalty, eFare, eCrowdDiscomfort, eTotalTypes };
This change has been carried out in order to generalize and ease the use of this enumeration in Next.

MacroPTExperimentParams Class

Functions

qint32 transferPenaltyId() const;
void setTransferPenalty( qint32 iId );

are replaced by

GKFunctionCost* getTransferPenalty() const;
void setTransferPenalty( GKFunctionCost* function );

MacroPTAdjustmentScenarioOutputData Class

userDefinedSkims function

Function signature has changed from:

GKProblemNet * getProblemNet(GKModel *iModel) const;
to
GKProblemNet * getProblemNet() const;

PTExperimentOutputData Class

getSkimMatrices function

Function signature has changed from:

QVector< qint32 > getSkimMatrices( GKModel * model ) const;
to
QList< const GKODMatrix* > getSkimMatrices() const;

setSkimMatrices function

Function signature has changed from:

void setSkimMatrices( const QVector<qint32> & iMatrices );
to
void setSkimMatrices( const QVector<const GKODMatrix*>& matrices );

GKDistributionDataSet Class

setDistributionArea function

Function signature has changed from:

void setDistributionArea( int iCentroidId, int iArea );
to
void setDistributionArea( const GKCentroid* centroid, GKDistributionCentroidType* area );

setParkingArea function

Function signature has changed from:

void setParkingArea( int iCentroidId, int iArea );
to
void setParkingArea( const GKCentroid* centroid, GKParkingCentroidType* area );

setAttributeValue function

Function signature has changed from:

void setAttributeValue(qint32 iCentroidId, int iUserClassId, int attributeIndex, double iValue );
to
void setAttributeValue( const GKCentroid* centroid, GKUserClass *user, int attributeIndex, double iValue );

getAttributeValue function

Function signature has changed from:

double getAttributeValue(qint32 iCentroidId, int iUserClassId, int attributeIndex ) const;
to
double getAttributeValue( const GKCentroid* centroid, GKUserClass *user, int attributeIndex ) const;

getDistributionData function

Function signature has changed from:

CentroidDistributionData* getDistributionData( int iCentroidId ) const;
to
CentroidDistributionData* getDistributionData( const GKCentroid* centroid ) const;

setDistributionData function

Function signature has changed from:

void setDistributionData( int iCentroidId, CentroidDistributionData * iCentroidDistributionData );
to
void setDistributionData( const GKCentroid* centroid, CentroidDistributionData * iCentroidDistributionData );

getDistributionArea function

Function signature has changed from:

GKDistributionCentroidType * getDistributionArea( int iCentroidId ) const;
to
GKDistributionCentroidType * getDistributionArea( const GKCentroid* centroid ) const;

getParkingArea function

Function signature has changed from:

GKParkingCentroidType * getParkingArea( int iCentroidId ) const;
to
GKParkingCentroidType * getParkingArea( const GKCentroid* centroid ) const;

setUseParkingAreaCosts function

Function signature has changed from:

void setUseParkingAreaCosts( int iCentroidId, bool iValue );
to
void setUseParkingAreaCosts( const GKCentroid* centroid, bool iValue );

getUseParkingAreaCosts function

Function signature has changed from:

bool getUseParkingAreaCosts( int iCentroidId ) const;
to
bool getUseParkingAreaCosts( const GKCentroid* centroid ) const;

setExternalArea function

Function signature has changed from:

void setExternalArea( int iCentroidId, bool iValue );
to
void setExternalArea( const GKCentroid* centroid, bool iValue );

getExternalArea function

Function signature has changed from:

bool getExternalArea( int iCentroidId ) const;
to
bool getExternalArea( const GKCentroid* centroid ) const;

getModalSplitData function

New function to access the modal split data of a centroid. Total set of records:

void QVector<ModalSplitData> getModalSplitData( const GKCentroid* centroid ) const;
Specific record:
ModalSplitData getModalSplitData(ModalSplitData::Type iType, const GKCentroid* centroid, qint32 iPurpose, qint32 iCarAvailability, qint32 iTimePeriod ) const;

setModalSplitData function

New function to set the total set of records of modal split in a centroid:

void setModalSplitData( const GKCentroid* centroid, const QVector< ModalSplitData > & iData );

ModalSplitData Class

getCarAvailabiltiy function

New function to get the car availability:

qint32 getCarAvailabiltiy() const;

getFactor function

New function to get a transportation mode factor:

double getFactor( GKTransportationMode* mode ) const;

getPurpose function

New function to get the purpose:

qint32 getPurpose() const;

getTimePeriod function

New function to get the time period:

qint32 getTimePeriod() const;

getType function

New function to get the modal split type ( 0 - Generation, 1 - Attraction ):

Type getType() const;

setCarAvailability function

New function to set the car availability:

void setCarAvailability( qint32 iMode );

setFraction function

New function to set factor of a transportation mode:

void setFraction( GKTransportationMode* iMode, double iFactor );

setPurpose function

New function to set the purpose:

void setPurpose( GKTripPurpose* purpose );

setTimePeriod function

New function to set the time period:

void setTimePeriod( GKTimePeriod* period );

setType function

New function to set the modal split type ( 0 - Generation, 1 - Attraction ):

void setType( Type iType );

valid function

New function to check modal split data validity ( valid = attributes and percentages are correct ):

bool valid() const;

validAttributes function

New function to check modal split data attributes validity:

bool validAttributes() const;

validPercentages function

New function to check modal split data percentages validity:

bool validPercentages() const;

CentroidDistributionData Class

distributionArea attribute

Attribute int distributionArea has been replaced by the following functions:

    void setDistributionArea( GKDistributionCentroidType* area );
    GKDistributionCentroidType* getDistributionArea() const;

parkingArea attribute

Attribute int parkingArea has been replaced by the following functions:

    void setParkingArea( GKParkingCentroidType * area );
    GKParkingCentroidType* getParkingArea() const;

setDistributionAttribute function

Function signature has changed from:

void setDistributionAttribute( int iUserClassId, uint iIndex, double iValue );
to
void setDistributionAttribute( GKUserClass *user, uint iIndex, double iValue );

getDistributionAttribute function

Function signature has changed from:

double getDistributionAttribute( int iUserClassId, uint iIndex ) const
to
double getDistributionAttribute( GKUserClass *user, uint iIndex ) const;

MacroExperimentOutputData Class

getSkimMatrices function

Function signature has changed from:

QVector< GKODMatrix* > getSkimMatrices( GKModel * model ) const;
to
QVector< GKODMatrix* > getSkimMatrices() const;

setSkimMatrices function

Function signature has changed from:

void setSkimMatrices( const QVector<qint32> & iMatrices );
to
void setSkimMatrices( const QVector<GKODMatrix*> & iMatrices );

GKGenerationAttractionScenario Class

setDataGroup function

Function signature has changed from:

void setDataGroup( int dataGroup );
to
void setDataGroup( GKGenerationAttractionDataSet* dataGroup );

getDataGroup function

Function signature has changed from:

int getDataGroup() const;
to
GKGenerationAttractionDataSet* getDataGroup() const;

GKGenerationAttractionCentroidType Class

setGAFactors function

Function signature has changed from:

void setGAFactors( qint32 dataSetId, qint32 variableId, qint32 timePeriodId, qint32 modeId, qint32 purposeId, double generation, double attraction );
to
void setGAFactors( GKGenerationAttractionDataSet* dataSet, qint32 variableId, qint32 timePeriodId, qint32 modeId, qint32 purposeId, double generation, double attraction );

getGAFactors function

Function signature has changed from:

QPair<double,double> getGAFactors( qint32 dataSetId, qint32 variableId, qint32 timePeriodId, qint32 modeId, qint32 purposeId );
to
QPair<double,double> getGAFactors( GKGenerationAttractionDataSet* dataSet, qint32 variableId, qint32 timePeriodId, qint32 modeId, qint32 purposeId ) const;

GKGenerationAttractionData Class

m_variable attribute

Attribute int m_variable has been replaced by the following functions:

    void setVariable( GKGenerationAttractionDataSetAttribute* var );
    GKGenerationAttractionDataSetAttribute* getVariable() const;

m_timePeriod attribute

Attribute int m_timePeriod has been replaced by the following functions:

    void setTimePeriod( GKTimePeriod* period );
    GKTimePeriod* getTimePeriod() const;

m_mode attribute

Attribute int m_mode has been replaced by the following functions:

    void setMode( GKTransportationMode* mode );
    GKTransportationMode* getMode() const;

GKGenerationAttractionFactor Class

m_purpose attribute

Attribute int m_purpose has been replaced by the following functions:

    void setPurpose( GKTripPurpose* purpose );
    GKTripPurpose* getPurpose() const;

GKGenerationAttractionDataSet Class

getTripGenerationArea function

Function signature has changed from:

GKGenerationAttractionCentroidType * getTripGenerationArea( int iCentroidId ) const;
to
GKGenerationAttractionCentroidType * getTripGenerationArea( const GKCentroid* centroid ) const;

setTripGenerationArea function

Function signature has changed from:

void setTripGenerationArea( int iCentroidId, int iAreaId );
to
void setTripGenerationArea( const GKCentroid* centroid, GKGenerationAttractionCentroidType* area );

useExternalData function

Function signature has changed from:

bool useExternalData( int iCentroidId ) const;
to
bool useExternalData( const GKCentroid* centroid ) const;

setExternalData function

Function signature has changed from:

void setExternalData( int iCentroidId, QVector<ExternalData> & iExternalData );
to
void setExternalData( const GKCentroid* centroid, QVector<ExternalData> & iExternalData );

setUseExternalData function

Function signature has changed from:

void setUseExternalData( int iCentroidId, bool iExternalData );
to
void setUseExternalData( const GKCentroid* centroid, bool iExternalData );

setCarAvailabilityData function

Function signature has changed from:

void    setCarAvailabilityData( int iCentroidId, QVector<CAData> & iCAData );
to
void    setCarAvailabilityData( const GKCentroid* centroid, QVector<CAData> & iCAData );

void    setCarAvailabilityData( int iCentroidId, int purposeId, double iValue );
to
void    setCarAvailabilityData( const GKCentroid* centroid, int purposeId, double iValue );

getCarAvailabilityData function

Function signature has changed from:

double  getCarAvailabilityData( int iCentroidId, int purposeId );
to
double  getCarAvailabilityData( const GKCentroid* centroid, int purposeId );

setAttributeData function

Function signature has changed from:

void setAttributeData( int iCentroidId, qint32 iAttributeId, double iValue );
to
void setAttributeData( const GKCentroid* centroid, GKGenerationAttractionDataSetAttribute* attr, double iValue );

setCarOwnership function

Function signature has changed from:

void setCarOwnership( int iCentroidId, int iCarOwnership );
to
void setCarOwnership( const GKCentroid* centroid, int iCarOwnership );

setAverageHousehold function

Function signature has changed from:

void setAverageHousehold( int iCentroidId, double iAverageHousehold );
to
void setAverageHousehold( const GKCentroid* centroid, double iAverageHousehold );

doBalancing function

Function signature has changed from:

bool    doBalancing( int iCentroidId ) const;
to
bool    doBalancing( const GKCentroid* centroid ) const;

setDoBalancing function

Function signature has changed from:

void    setDoBalancing( int iCentroidId, bool iBalancing );
to
void    setDoBalancing( const GKCentroid* centroid, bool iBalancing );

getCarOwnership function

Function signature has changed from:

int     getCarOwnership( int iCentroidId ) const;
to
int     getCarOwnership( const GKCentroid* centroid ) const;

getAverageHousehold function

Function signature has changed from:

double  getAverageHousehold( int iCentroidId ) const;
to
double  getAverageHousehold( const GKCentroid* centroid ) const;

addAttribute function

Function signature has changed from:

void addAttribute(int iAttributeId);
to
void addAttribute( GKGenerationAttractionDataSetAttribute* iAttribute );

getAttributes function

Function signature has changed from:

const QVector<int> & getAttributes();
to
QVector<GKGenerationAttractionDataSetAttribute*> getAttributes();

checkCreateData function

Function signature has changed from:

void checkCreateData( int iCentroidId );
to
void checkCreateData( const GKCentroid* centroid );

getData function

Function signature has changed from:

const CentroidGenerationAttractionData * getData( int iCentroid ) const;
to
const CentroidGenerationAttractionData * getData( const GKCentroid* centroid ) const;

getValue function

Function signature has changed from:

double getValue( int iCentroid, int iAttributeId ) const;
to
double getValue( const GKCentroid* centroid, GKGenerationAttractionDataSetAttribute* iAttribute ) const;

setValue function

Function signature has changed from:

void setValue( int iCentroid, int iAttributeId, double iValue );
to
void setValue( const GKCentroid* centroid, GKGenerationAttractionDataSetAttribute* iAttribute, double iValue );

setExternalData function

Function signature has changed from:

void setExternalData( int iCentroidId, int purpose, int mode, int period, double arrivals, double departures );
to
void setExternalData( const GKCentroid* centroid, int purpose, int mode, int period, double arrivals, double departures );

getExternalData function

Function signature has changed from:

QPair<double,double> getExternalData( int iCentroidId, int purpose, int mode, int period, bool found ) const;
to
QPair<double,double> getExternalData( const GKCentroid* centroid, int purpose, int mode, int period, bool found ) const;

CentroidGenerationAttractionData Class

attributes attribute

Access to attributes is now done via the following functions:

    void setValue( GKGenerationAttractionDataSetAttribute* attr, double value );
    double getValue( GKGenerationAttractionDataSetAttribute* attr ) const;

tripGenerationArea attribute

Access to tripGenerationArea is now done via the following functions:

    void setArea( GKGenerationAttractionCentroidType* area );
    GKGenerationAttractionCentroidType* getArea() const;

GKDistributionCentroidType Class

getDistributionFunction function

Function signature has changed from:

int getDistributionFunction( int iDataSet, int iPurpose, int iCA, int iTimePeriod );
to
GKFunctionCost* getDistributionFunction( const GKDistributionDataSet* dataset, const GKTripPurpose* purpose, qint32 iCA, const GKTimePeriod* timePeriod ) const;    

setDistributionFunction function

Function signature has changed from:

void setDistributionFunction( int iDataSet, int iPurpose, int iCA, int iTimePeriod, int iFunctionId );
to
void setDistributionFunction( const GKDistributionDataSet* dataset, const GKTripPurpose* purpose, qint32 iCA, const GKTimePeriod* timePeriod, const GKFunctionCost* function ); 

getModalSplitFunction function

Function signature has changed from:

int getModalSplitFunction( int iDataSet, int iPurpose, int iCA, int iTimePeriod );
to
GKFunctionCost* getModalSplitFunction( const GKDistributionDataSet* dataset, const GKTripPurpose* purpose, qint32 iCA, const GKTimePeriod* timePeriod ) const;

setModalSplitFunction function

Function signature has changed from:

void setModalSplitFunction( int iDataSet, int iPurpose, int iCA, int iTimePeriod, int iFunctionId );
to
void setModalSplitFunction( const GKDistributionDataSet* dataset, const GKTripPurpose* purpose, qint32 iCA, const GKTimePeriod* timePeriod, const GKFunctionCost* function );

GKControlPlan Class

addControlMetering function

Function signature has changed from:

void addControlMetering( uint idmetering, GKControlMetering *meter );
to
void addControlMetering( GKMetering *metering, GKControlMetering *meter );

removeControlMetering function

Function signature has changed from:

void removeControlMetering( uint idmetering );
to
void removeControlMetering( GKMetering *metering );

removeControlMetering function

Function signature has changed from:

GKControlMetering * getControlMetering( uint /*idmetering*/ ) const;
to
GKControlMetering * getControlMetering( GKMetering* metering ) const;

removeControlMetering function

Function signature has changed from:

const GKControlPlanJunctions & getControlJunctions() const;
to
QMap<uint, GKControlJunction*> getControlJunctions() const;

removeControlMetering function

Function signature has changed from:

const GKControlPlanMeterings & getControlMeterings() const;
to
QMap<uint, GKControlMetering*> getControlMeterings() const;

GKControlPhase Class

addSignal function

Function signature has changed from:

void addSignal( uint idSignal, const QString & name = "", GKControlPhaseSignal::FlashingType flashing = GKControlPhaseSignal::eNo );
to
void addSignal( GKControlPlanSignal* signal, GKControlPhaseSignal::FlashingType flashing = GKControlPhaseSignal::eNo );

GKControlPhaseSignal Class

GKControlPhaseSignal function

Function signature has changed from:

GKControlPhaseSignal( uint, const QString &, FlashingType );
to
GKControlPhaseSignal( GKControlPlanSignal* s, FlashingType f );

Public attributes to functions

Public attributes no longer available:

    uint signal;
    QString name;
    FlashingType flashing;

The following functions need to be used instead:

    void setSignal( GKControlPlanSignal* signal );
    GKControlPlanSignal* getSignal() const;

    void setFlashingType( GKControlPhaseSignal::FlashingType flashing );
    GKControlPhaseSignal::FlashingType getFlashingType() const;

NodeOutput Class

The following functions have been renamed to ease the comprehension of the NodeOutput class:

getOutputs function

Function signature has changed from:

const QVector< NodeOutputElement > &        getOutputs() const;
to:
const QVector< NodeOutputElement > &        getElements() const;

setOutputs function

Function signature has changed from:

void    setOutputs( const QVector< NodeOutputElement > & elements );
to:
void    setElements( const QVector< NodeOutputElement > & elements );

NodeSlot Class

The following functions have been renamed to ease the comprehension of the NodeSlot class:

getObjectType function

Function signature has changed from:

EDataObjectType     getObjectType() const;
to:
EDataObjectType     getSlotType() const;

NodeConnection Class

The following functions have been renamed to ease the comprehension of the NodeConnection class:

getFilter function

Function signature has changed from:

const NodeOutput &      getFilter() const;
to:
const NodeOutput &      getDiscardedElements() const;

setFilter function

Function signature has changed from:

void        setFilter( const NodeOutput & filter );
to:
void        setDiscardedElements( const NodeOutput & iElements );

Sitraffic Classes

A generalization of Sitraffic plugin has been implemented and therefore the following classes have been renamed:

  • SitrafficDetectionPatternTemplateNewCmd to OCITDetectionPatternTemplateNewCmd
  • SitrafficDetectionPatternNewCmd to OCITDetectionPatternNewCmd
  • SitrafficDetectionPatternTemplate to OCITDetectionPatternTemplate
  • SitrafficDetectionPattern to OCITDetectionPattern
  • SitrafficDetectionPatternEvent to OCITDetectionPatternEvent
  • SitrafficSimulationEvent to OCITSimulationEvent
OCITDetectionPatternEvent Class

The start and duration of a SitrafficDetectionPatternEvent was stablished using the following functions:

    void setWhen( int cycle, double secondInCycle );
    void setDuration( const GKTimeDuration & time );

This is no longer the case for OCITDetectionPatternEvent, the correct way to set an activation time is to use the function:

    void setFrom( int cycle, double secondInCycle );

To deactivate de event the following use function:

    void setTo( int cycle, double secondInCycle );

Calling either void setWhen( int cycle, double secondInCycle ); or void setDuration( const GKTimeDuration & time ); will result in undefined behavior.

Aimsun Next 20.0.X changes

The following is a list of all the functions that have changed or have been added after the release of Aimsun Next 20. The classes with changes are:

GKFunctionComponent Class

The GKFunctionComponent class has been opened to scripting via the following functions:

setDerived
void    setDerived( bool iValue );
getDerived
bool    getDerived() const;
setFunctionString
void    setFunctionString( QString iValue );
getFunctionString
const QString & getFunctionString() const;
setComponent1
void    setComponent1( qint32 iValue );
getComponent1
qint32  getComponent1() const;
setComponent2
void    setComponent2( qint32 iValue );
getComponent2
qint32  getComponent2() const;
setFactor
void    setFactor( double iValue );
getFactor
double  getFactor() const;
setOperation
void    setOperation( Operation operation );
getOperation
Operation   getOperation() const;

Where Operation can represent the following operations:

enum Operation{eMultiply=0, eDivide, eAdd, eSubtract}

DistributionScenario Class

The following functions have been added to allow the selection of the skim matrices associated to GKFunctionComponents via scripting:

getComponentSkim
GKODMatrix* getComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent ) const;
setComponentSkim
void setComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent, GKODMatrix& iSkim );
removeComponentSkim
void removeComponentSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const GKFunctionComponent& iComponent );

ModalSplitScenario Class

The following functions have been added to allow the selection of the trip matrices and to ease the selection of of the skims matrices associated to them:

removeTripMatrices
void removeTripMatrices();
addTripMatrix
void addTripMatrix( GKODMatrix& iMatrix );
getSkim
GKODMatrix* getSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType ) const;
setSkim
void    setSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode , GKODMatrix &iSkim );
removeSkim
void    removeSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType );
getComponentSkim
GKODMatrix* getComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent ) const;
setComponentSkim
void    setComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent, GKODMatrix& iSkim );
removeComponentSkim
void    removeComponentSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const GKFunctionComponent& iComponent );
getUserDefinedSkim
GKODMatrix* getUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex ) const;
setUserDefinedSkim
void    setUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex, GKODMatrix& iSkim );
removeUserDefinedSkim
void    removeUserDefinedSkim( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode, const uint iColumnIndex );
getAllSkims
QVector<GKODMatrix*>    getAllSkims( const GKODMatrix& iTripMatrix, const GKTransportationMode& iMode ) const;

The following functions has been added to select the GKTimePeriod:

setTimePeriod
void    setTimePeriod( GKTimePeriod* iTimePeriod );

We recommend to use it instead of:

setTimePeriod
void    setTimePeriod( quint32 timePeriod );

MacroScenarioOutputData Class

The following functions have been added to configure the scenario to collect (or not) SubPath statistics:

getCollectSubPathsStats
bool getCollectSubPathsStats() const;
setCollectSubPathsStats
bool setCollectSubPathsStats( bool iValue );

CMacroTurning Class

The following function has been added to access the duration of the uncontrolled time for the period under study (e.g. simulation duration):

double  getUncontrolledTime() const;

DTATurning Class

The following function has been added to access the duration of the uncontrolled time for the period under study (e.g. Route Choice Interval):

double  getUncontrolledTime() const;

DistributionOutput Class

createMatrix

The function:

QVector< GKODMatrix * > createMatrix( GKTripPurpose* iPurpose, bool temporary )

Now only accepts well-defined GKTripPurposes (different than None):

QVector< GKODMatrix * > createMatrix( const GKTripPurpose& iPurpose, bool temporary )

MacroAdjustmentScenarioParams Class

The following function has been added in order to give access to the Congested Sections group:

getCongestedSections
GKGroup * getCongestedSections() const;

MacroPTStatsManager Class

The following functions have been added in order to allow (when combined with a MacroPTStatsView) to access the outputs from a Static Transit Assignment (MacroPTExperiment)

getExperiment
MacroPTExperiment *  getExperiment() const;
getFromTime
QDateTime   getFromTime() const;
getToTime
QDateTime   getFromTime() const;
restore
void   restore( MacroPTExperiment * _experiment );

MacroPTStatsView Class

A new helper class to help collecting statistics has been added. The Macro Transit Stats View class gives access to all statistics calculated by a Static Transit Assignment (MacroPTExperiment). There are 52 methods which are not listed here to improve readability.

GKFunctionCost Class

The following functions have been added to the GKFunctionCost class in order to improve the consistency of the scripting when evaluating the Transit Delay Time:

evaluatePTDelayTime

double evaluatePTDelayTime(const GKFunctionCostContext * context, const GKPublicLine& iLine, const GKPTSectionData&iSection ) const;

evaluatePTDelayTime

double evaluatePTDelayTime(const GKFunctionCostContext * context, const GKPublicLine& iLine, const StopToStop& iSection) const;

evaluatePTDelayTime

double evaluatePTDelayTime(const GKFunctionCostContext * context, const GKSimulatedObject& iLine, const void* iSection) const;

As the previous functions contain explicit information of the argument types, should be preferred over the function:

evaluatePTDelayTime

double evaluatePTDelayTime(const GKFunctionCostContext * context, const GKBaseObject * iLine, const void *iSection , const bool fromGui, const bool iFromDTA ) const;

GKPTStation Class

The set/get functions for the connection waiting times have been updated in the GKPTStation class in order to improve its readability and consistency:

The function:

setWaitingTimes

void setWaitingTimes(const QMap< QPair<GKPublicLine*,GKPublicLine*>, double> & waitingTimes);

has been replaced by the function:

setWaitingTime

void setWaitingTime( const GKPublicLine& iFromLine, const GKPublicLine& iToLine, const double iWaitingTime );

The function:

getWaitingTimes

const QMap< QPair<GKPublicLine*,GKPublicLine*>, double> & getWaitingTimes() const;

has been replaced by the function:

getWaitingTime

double & getWaitingTimes(const GKPublicLine& iFromLine, const GKPublicLine& iToLine) const;

DTAPTLineSegment Class

The access to the origin and destination stop has been made consistent with the context they refer to. The following functions have been removed:

getDTAOrigin

const DTAPTStop * getDTAOrigin() const;

getDTADestination

const DTAPTStop * getDTADestination() const;

While the following functions have been modified:

getOrigin

const GKBusStop* getOrigin() const;

has been replaced by the function:

getOrigin

const DTAPTStop* getOrigin() const;

And the function:

getDestination

const GKBusStop* getDestination() const;

has been replaced by the function:

getDestination

const DTAPTStop* getDestination() const;

If the user requires accessing the GKBusStop associated to a DTAPTStop, just use the function GKSimulatedObject::getMaster() on DTAPTStop.

PTSection Class

The access to the origin and destination stop has been made consistent with the context they refer to. The following functions have been removed:

getOriginPT

const PTStop * getOriginPT() const;

getDestinationPT

const PTStop * getDestinationPT() const;

While the following functions have been modified:

getOrigin

const GKBusStop* getOrigin() const;

has been replaced by the function:

getOrigin

const PTStop* getOrigin() const;

And the function:

getDestination

const GKBusStop* getDestination() const;

has been replaced by the function:

getDestination

const PTStop* getDestination() const;

If the user requires accessing to the GKBusStop associated to a PTStop, just use the function GKSimulatedObject::getMaster() on PTStop.

GKModel Class

The default identifier form is now stored at GKModel level. The following functions have been added:

setIdentifierForm

void setIdentifierForm( GKObject::IdentifierForm form );

getIdentifierForm

GKObject::IdentifierForm getIdentifierForm() const;

GKObject Class

The default identifier form is now handled at GKModel level. GKObject::defaultIdentifierForm is no longer available.

GenerationAttractionOutput Class

The following functions have been added to access to the total arrivals and departures filtering by GKTripPurpose, GKTransportationMode and whether if the value is before or after balancing departures and arrivals ( by default after balancing ):

getTotalArrivals

double  getTotalArrivals( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode, bool iBeforeBalance = false  )     const;

getTotalArrivalsCA

double  getTotalArrivalsCA( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode, bool iBeforeBalance = false )    const;

getTotalArrivalsNCA

double  getTotalArrivalsNCA( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode, bool iBeforeBalance = false )   const;

getTotalDepartures

double  getTotalDepartures( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode,  bool iBeforeBalance = false )   const;

getTotalDeparturesCA

double  getTotalDeparturesCA( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode, bool iBeforeBalance = false )  const;

getTotalDeparturesNCA

double  getTotalDeparturesNCA( const GKTripPurpose& iPurpose , const GKTransportationMode& iMode, bool iBeforeBalance = false ) const;

NodeOutputElement Class

The following functions have been added to complete the scripting of this class:

getOutputType

double  getOutputType() const;

setOutputType

double  setOutputType( const EDataObjectType iOutputType ) const;

setDiscriminant

QVector<FourSteps::DataDiscriminant>    getDiscriminants() const;

FourStepsUtil File

This file has been added to centralize all definitions that are common to all classes and methods define in the FourSteps plug-in scripting. Such as FourSteps::DataDiscriminant or the EDataObjectType.

NodeSlot Class

The following functions have been added to complete the scripting of this class:

getObjectType function
EDataObjectType getObjectType() const;
getConnectionType function
EConnectionType getConnectionType() const;
getMode function
ESlotMode getMode() const;
isCompatible function
bool isCompatible( const NodeSlot * iNodeSlot ) const;
getConnections function
QVector< NodeConnection * > getConnections() const;
getOutputElements function
NodeOutput      getOutputElements() const;

NodeCompute Class

The following functions have been added to complete the scripting of this class:

getInputSlots function
QVector< NodeSlot * >       getInputSlots() const;
getOutputSlots function
QVector< NodeSlot * >       getOutputSlots() const;
getTarget function
GKObject*                   getTarget();
getSlotOutputElements function
QVector<NodeOutputElement>  getSlotOutputElements( const QString &slotId ) const;
getOutputObjects function
QVector<GKObject*> getOutputObjects( const QString & slotId ) const;

NodeConnection Class

The following functions have been added to complete the scripting of this class:

getFilter function
const NodeOutput &  getFilter() const;
setFilter function
void                setFilter( const NodeOutput & filter );

GKControllerParsSitrafficOffice Class

The following functions have been added to complete the scripting of this class:

setProtocolFilepath function
    void setProtocolFilepath( const QString& filepath );
getProtocolFilepath function
    const QString& getProtocolFilepath() const;
setGraphicalViewConfigurations function
    void setGraphicalViewConfigurations( const QStringList& configurations );
getGraphicalViewConfigurations function
    const QStringList& getGraphicalViewConfigurations() const;
setProtocolViewConfigurations function
    void setProtocolViewConfigurations( const QStringList& configurations );
getProtocolViewConfigurations function
    const QStringList& getProtocolViewConfigurations() const;

Aimsun Next 20 changes

The following is a list of all the functions that have changed between Aimsun Next 8.4 and Aimsun Next 20 in order to help update old scripts easily. The classes with changes are:

GKCatalog Class

findObjectsByExternalId function

The function now returns all objects with the same external id for a given GKType instead of just one.

GKGeometryConfiguration Class

existent function

Function signature has changed from:

bool existent(quint32 val);

to

bool existent( const GKObject* object);
nonexistent function

Function signature has changed from:

bool nonexistent(quint32 val);

to:

bool nonexistent( const GKObject* object);
getExistent function

Function signature has changed from:

const QSet<quint32> & getExistent() const;

to:

QVector<GKObject*> getExistent() const;
getNonExistent function

Function signature has changed from:

const QSet<quint32> & getNonExistent() const;

to:

QVector<GKObject*> getNonExistent() const;
addExistent function

Function signatures has changed from:

void addExistent( quint32 id );

to:

void addExistent( GKObject* object );
addNonExistent function

Function signatures has changed from:

void addNonExistent( quint32 id );

to:

void addNonExistent( GKObject* object );
removeExistent function

Function signatures has changed from:

void removeExistent( quint32 id );

to:

void removeExistent( GKObject* object );
removeNonExistent function

Function signatures has changed from:

void removeNonExistent( quint32 id );

to:

void removeNonExistent( GKObject* object );

GKProblemNet Class

getManualSections function

Function signature has changed from:

const QVector<uint> & getManualSections() const;

to

QVector<GKSection*> getManualSections() const;
setManualSections function

Function signature has changed from:

void setManualSections( QVector<uint> sections );

to

void setManualSections( const QVector<GKSection*>& sections );
addManualSection function

Function signature has changed from:

void addManualSection( uint aId );

to

void addManualSection( GKSection* section );
removeManualSection function

Function signature has changed from:

void removeManualSection( uint aId );

to

void removeManualSection( GKSection* section );
containsManualSection function

Function signature has changed from:

bool containsManualSection( uint aId ) const;

to

bool containsManualSection( GKSection* section ) const;

GKSimulationArea Class

getManualSections function

Function signature has changed from:

const QVector<quint32> & getManualSections() const;

to

QVector<GKSection*> getManualSections() const;
setManualSections function

Function signature has changed from:

void setManualSections( QVector<quint32> sections );

to

void setManualSections( const QVector<GKSection*>& sections );
addManualSection function

Function signature has changed from:

void addManualSection( quint32 aId );

to

void addManualSection( GKSection* section );
removeManualSection function

Function signature has changed from:

void removeManualSection( quint32 aId );

to

void removeManualSection( GKSection* section );
containsManualSection function

Function signature has changed from:

bool containsManualSection( quint32 aId ) const;

to

bool containsManualSection( GKSection* section ) const;

GKTrafficArrivals Class

setReplication function

Function signature has changed from:

void setReplication( uint id );

to

void setReplication( GKReplication* replication );
getReplication function

Function signature has changed from:

uint getReplication() const;

to

const GKReplication* getReplication() const;

AdjustmentMeasurementContext Class

The MeasurementType type now can represent one more types of measurement: eTotalODCount (associated to the OD term aggregated by time interval):

enum MeasurementType{ eNone, eSection, eTurning, eDetector, eOriginCount, eDestinationCount, eBoarding, eAlighting, ePathLengthDistribution, ePTDetector, eODProportions, eSuperNodeTrajectory, eGKRoute, eTotalODCount, eODCount }

MacroAdjustmentScenario Class

The following functions have been moved to MacroAdjustmentExperiment:

getParams Function
    const MacroAdjustmentScenarioParams & getParams() const;
setParams Function
    void setParams( const MacroAdjustmentScenarioParams & params ); 
setTripMatrix Function
    void setTripMatrix( GKODMatrix *iMatrix );
tripMatrix Function
    GKODMatrix* tripMatrix() const;
setTripMatrixReliability Function
    void setTripMatrixReliability( double iFactor );
tripMatrixReliability Function
    double tripMatrixReliability() const;
setTripMatrixCentroidGrouping Function
    void setTripMatrixCentroidGrouping( GKGroup *iGroup );
tripMatrixCentroidGrouping Function
    GKGroup* tripMatrixCentroidGrouping() const;

The following functions have been added:

getInitialDateTime Function
    QDateTime getInitialDateTime() const;
getDuration Function
    GKTimeDuration getDuration() const;
getFinishDateTime Function
    QDateTime getFinishDateTime() const;
storeOutput Function
    bool storeOutput() const;
setStoreOutput Function
    void setStoreOutput( bool iValue ); 

MacroAdjustmentExperiment Class

The following functions have been added:

getParams Function
    const MacroAdjustmentScenarioParams & getParams() const;
setParams Function
    void setParams( const MacroAdjustmentScenarioParams & params ); 
setTripMatrix Function
    void setTripMatrix( GKODMatrix *iMatrix );
tripMatrix Function
    GKODMatrix* tripMatrix() const;
setTripMatrixReliability Function
    void setTripMatrixReliability( double iFactor );
tripMatrixReliability Function
    double tripMatrixReliability() const;
setTripMatrixCentroidGrouping Function
    void setTripMatrixCentroidGrouping( GKGroup *iGroup );
tripMatrixCentroidGrouping Function
    GKGroup* tripMatrixCentroidGrouping() const;
setDefaultParamsForAllUserClasses Function
    void setDefaultParamsForAllUserClasses( float alpha, float tripLengthDistributionElasticity );

MacroAdjustmentScenarioUserClassParams Class

getPerCentroidEntranceData Function

Function signature has been changed from:

    GKCentroidVector * getPerCentroidEntranceData( GKModel * iModel ) const;

to

    GKCentroidVector * getPerCentroidEntranceData() const;
getPerCentroidExitData Function

Function signature has been changed from:

    GKCentroidVector * getPerCentroidExitData(GKModel *iModel) const;

to

    GKCentroidVector * getPerCentroidExitData() const;
getODMaxDeviations Function

Function signature has been changed from:

    GKODMatrix * getODMaxDeviations( GKModel * iModel ) const;

to

    GKODMatrix * getODMaxDeviations() const;

MacroAdjustmentScenarioParams Class

The following functions have been moved to MacroAdjustmentScenario:

getInitialDateTime Function
    QDateTime getInitialDateTime() const;
getDuration Function
    GKTimeDuration getDuration() const;
storeOutput Function
    bool storeOutput() const;
setStoreOutput Function
    void setStoreOutput( bool iValue );

The following function has been moved to MacroAdjustmentExperiment:

setDefaultParamsForAllUserClasses Function
    void setDefaultParamsForAllUserClasses( double alpha, double tripLengthDistributionElasticity);

The following functions have been changed:

setDetectorGrouping Function

Function signature has been changed from:

    void setDetectorGrouping( qint32 iGrouping );

to

    void setDetectorGrouping(  GKGroupingType* grouping  );
setCentroidGrouping Function

Function signature has been changed from:

    void setCentroidGrouping( qint32 iGrouping );

to

    void setCentroidGrouping( GKGroupingType* grouping  );
getDetectorGrouping Function

Function signature has been changed from:

    qint32 getDetectorGrouping() const;

to

    GKGroupingType* getDetectorGrouping() const;
getCentroidGrouping Function

Function signature has been changed from:

    qint32 getCentroidGrouping() const;

to

    GKGroupingType* getCentroidGrouping() const;

The following function has been removed:

setDetectorCoverageThreshold Function
    void setDetectorCoverageThreshold( int value );

MacroPTAdjustmentScenario Class

The following functions have been moved to MacroPTAdjustmentExperiment:

getMatrixDeviations Function
    QMap< GKUserClass*, GKODMatrix* > getMatrixDeviations() const;
setMatrixDeviations Function
    void setMatrixDeviations( const QMap< GKUserClass*, GKODMatrix * > & iMatrixDeviations );
getDeviationType Function
    MatrixDeviation::MatrixDeviationValueType getDeviationType() const;
setDeviationType Function
    void setDeviationType( MatrixDeviation::MatrixDeviationValueType iType );

MacroPTAdjustmentExperiment Class

The following functions have been added:

getMatrixDeviations Function
    QMap< GKUserClass*, GKODMatrix* > getMatrixDeviations() const;
setMatrixDeviations Function
    void setMatrixDeviations( const QMap< GKUserClass*, GKODMatrix * > & iMatrixDeviations );
getDeviationType Function
    MatrixDeviation::MatrixDeviationValueType getDeviationType() const;
setDeviationType Function
    void setDeviationType( MatrixDeviation::MatrixDeviationValueType iType );

DistributionScenario Class

The following functions have been added:

getSkim Function

        GKODMatrix* getSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType ) const;

setSkimFunction

        void setSkim(const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode , GKODMatrix &iSkim ) const;

removeSkim Function

        void removeSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ,  const GKODMatrix::AssignmentOutput & iCostType );

getUserDefinedSkim Function

        GKODMatrix* getUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex ) const;

setUserDefinedSkim Function

        void setUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex, GKODMatrix& iSkim );

removeUserDefinedSkim Function

        void removeUserDefinedSkim( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode, const uint iColumnIndex );

getAllSkims Function

        QVector<GKODMatrix*> getAllSkims( const GKGenerationAttractionVector& iGAVector , const GKTransportationMode& iMode ) const;

We recommend to use them for setting the Skims Matrices instead of:

setInitialUserSkim Function

        void setInitialUserSkim( const QMap<GKUserClass*, GKODMatrix *> & iSkims );

getInitialUserSkims Function

        QMap<GKUserClass*, GKODMatrix*> getInitialUserSkims() const;

getInitialUserSkim Function

        getInitialUserSkim( GKUserClass * iUser ) const;

Aimsun Next 8.4 changes

The following is a list of all the functions that have changed between Aimsun Next 8.3 and Aimsun Next 8.4 in order to help update old scripts easily. The classes with changes are:

GKScenarioInputData Class

getRecordSimulation function

The function to set or get whether a dynamic simulation is being recorded has been moved from the GKScenarioInputData class to the GKReplication class. The signature of both functions has remained the same and it is:

bool getRecordSimulation() const;

void setRecordSimulation( bool aRecordSimulation );

AdjustmentMeasurementContext Class

The MeasurementType type now can represent two more types of measurement: eGKRoute (associated to subpath counts) and eODCount (associated to the OD term):

enum MeasurementType{ eNone, eSection, eTurning, eDetector, eOriginCount, eDestinationCount, eBoarding, eAlighting, ePathLengthDistribution, ePTDetector, eODProportions, eSuperNodeTrajectory, eGKRoute, eODCount }

Changes introduced before Aimsun Next 8.4

The following is a list of all the functions that have changed between versions prior to Aimsun Next 8.4 in order to help update old scripts easily. The classes with changes are:

Besides that, there were changes in functions used for simulating and to create commands.

GKFolder Class

Aimsun 8.1.1 changes

getContentsTypes function

The getContentsTypes functions now has a fourth parameter to include the travel demand model.

Old signature:

QVector<GKType*> getContentsTypes( bool staticOn = true, bool mesoOn = true, bool microOn = true ) const;

New signature:

QVector<GKType*> getContentsTypes( bool staticOn = true, bool mesoOn = true, bool microOn = true, bool travelDemand = true ) const;

GKPublicLine Class

Aimsun 8.1.1 changes

createPTSections function

The createPTSections functions available in Aimsun 8.0 are no longer available in Aimsun 8.1 as GKPTSection has been removed.

Instead of calling the non-available function:

void createPTSections( const QList<GKSection*> & route, const QVector<GKBusStop*> & stops );

the following functions can be used:

publicLine.unsetPTLineForSections()
publicLine.setRoute( route )
publicLine.setPTLineForSections()
publicLine.setStops( stops )

GKNode Class

Aimsun 8.1.2 changes

getSignalPos function

The signature of getSignalPos has changed from:

uint getSignalPos( uint idSignal ) const;

to:

uint getSignalPos( uint idSignal, uint scenarioId = 0 ) const;

to include geometry configurations.

    /*! Returns the resulting vector of calculating the vectorial product between this vector and v2 */
    GKVector prodVect( const GKVector & v2 ) const; //producto vectorial entre this y v2.
    /*! Returns the scalar product between to vectors*/
    double prodEsc( const GKVector & v2) const;

GKVector

Aimsun 8.1.1 changes

prodVect Function

The function prodVect with signature:

    GKVector prodVect( const GKVector & v2 ) const;

has been replaced by the function:

    GKVector crossProduct( const GKVector & v2 ) const;
prodEsc Function

The function prodEsc with signature:

    double prodEsc( const GKVector & v2) const;

has been replaced by the function:

    double dotProduct( const GKVector & v2) const;

QString

Aimsun 8.2 changes

QString object has been deprecated. The new version automatically transforms QString objects into Python Strings and, therefore, their usage can be exactly as a Python String. In example:

    eid = section.getExternalId().toInt()

should be replaced by

    eid = int( section.getExternalId() )

QTime

Aimsun 8.2 changes

QTime usage has changed. The default constructor QTime() returns an invalid QTime object. Therefore, any method applied on it will fail. In order to create a QTime properly, the hours and minutes must be provided.

    qtime = QTime(0,0)

GKSection

GKSection getLanesLength function

The function:

GKCoord getLanesLength() const;

was deprecated in Aimsun Next 8.3 and it should be changed to either getLanesLength2D() or getLanesLength3D() depending on the output expected.

The main change in Aimsun 8.3 was the deprecation of all the different scripting classes to do the calculation procedures (dynamic simulations, assignment, adjustment, outputs retrieval, etc.).

Those classes and functions have been substituted by a mechanism, called Kernel Actions, for the different calculation procedures (dynamic simulations, assignment, adjustment, etc.) to provide a common interface to command their execution.

GKSystem has a method, GKSystem::executeAction, that allows you to execute a Kernel Action for a target object or a selection of objects.

All objects that perform a calculation (replication, assignment experiment, adjustment experiment, etc.) implement a Kernel Action, called execute, that starts the calculation. This has the same effect as right clicking on the object and selecting the menu item that starts the calculation (run batch simulation, run static traffic assignment, run static OD adjustment, etc.).

This makes particularly easy performing tasks like, for example, starting a batch simulation of a replication:

replication = model.getCatalog().find( 1001 )
GKSystem.getSystem().executeAction( "execute", replication, [], "" )

To run a set of simulations in sequence, you just have to provide a list of replications as third argument. Note that you need to state one of the replications as the second argument even though only the ones in the list (third argument), if it is not empty, will be simulated. The second argument needs to be an object of the same type as the ones in the third argument.

replication1 = model.getCatalog().find( 1001 )
replication2 = model.getCatalog().find( 1002 )
GKSystem.getSystem().executeAction( "execute", replication1, [replication1, replication2], "" )

To run a microscopic simulation in animated mode you just have to replace the action execute with the action play.

It’s worth noting that Kernel Actions are accessible also from the command line (DOS prompt or Terminal); therefore, you don’t need to write a script if you want to run programmatically a simulation that is already set.

"Aimsun Next" --verbose --project test.ang --command execute --target 1001

Commands to create all types of scenarios and experiments are now available.

Furthermore, the doit and undoit functions are no longer available and the model.getCommander().addCommand function should be used instead. For example, to create a Macro Transit Adjustment Experiment, the following code could be used:

cmd = model.createNewCmd( model.getType( "MacroPTAdjustmentExperiment" ));
cmd.setScenario( scenario );
model.getCommander().addCommand( cmd );
res = cmd.createdObject();