Updating Scripts For Newer Versions¶
Aimsun Next 26.0.2 changes¶
The following is a list of all the classes and functions that have changed or have been added after the release of Aimsun Next 26.0.1. The classes with changes are:
GKObjectDuplicateCmd Class¶
The init function was giving an error and the command could not be used as expected in 26.0.1.
GKSection Class¶
New enum and functions reporting whether a section's entrance and exit line angles suit its geometry, the condition behind Check & Fix warnings 1012 and 1013. calculateHullValidity derives the verdict from the section itself, so it needs no view. checkHullValidity serves callers that already hold a contour, such as the 2D section drawer.
HullValidity¶
enum class HullValidity { eValid, eWrongEntry, eWrongExit };
calculateHullValidity¶
HullValidity calculateHullValidity() const;
checkHullValidity¶
static HullValidity checkHullValidity( const GKPoints & hull );
PTStop Class¶
The transit stop passed to transit boarding cost and dwell time functions. A transit assignment now has one PTStop per stop. Before, a waiting time function override for a line made an extra PTStop copy of the stop, whose getWaitingTimeFunction() returned the override.
getWaitingTimeFunction¶
Returns the waiting time function used to board iLine at the stop: the line's override if the stop has one, otherwise the stop's own function. Without a line, it returns the stop's own function. None means the default function. In Python only: in Lua, getWaitingTimeFunction() takes no line and returns the stop's own function.
GKFunctionCost * getWaitingTimeFunction( const GKPublicLine * iLine = nullptr ) const;
getWaitingTimeOverrides¶
Returns the waiting time functions that override the stop's own function, by line. Python only.
const QMap<GKPublicLine *, GKFunctionCost *> & getWaitingTimeOverrides() const;
Aimsun Next 26.0.1 changes¶
The following is a list of all the classes and functions that have changed or have been added after the release of Aimsun Next 26.0.0. The classes with changes are:
- GKObject
- GKCheckAndFix
- GKCheckMessageCatalog
- GKCheckMessage
- GKColumnIds
- GKExperimentResult
- GKReplication
- MacroExperiment
GKObject Class¶
The following functions are no longer available for GKObject and its children:
clone¶
virtual GKObject * clone( bool addItToModel = true, bool temporary = false ) const;
cloneAsTemporary¶
GKObject * cloneAsTemporary( bool addItToModel = true ) const;
For creating copies of objects use the GKObjectDuplicateCmd instead. Sample code:
```duplicateCmd = GKObjectDuplicateCmd() duplicateCmd.setName("Duplicating an object") # optional, it will show this name in the undo button duplicateCmd.init(target) duplicateCmd.setModel(model) commander = model.getCommander() commander.addCommand(duplicateCmd)
### <a id="gkcheckandfix2601">GKCheckAndFix Class</a>
New class in `PyANGExtras`. Runs Check & Fix on a given experiment.
### <a id="gkcheckmessagecatalog2601">GKCheckMessageCatalog Class</a>
New class in `PyANGExtras`. Stores the check messages produced by `GKCheckAndFix`.
### <a id="gkcheckmessage2601">GKCheckMessage Class</a>
New class in `PyANGExtras`. Represents a single check result.
### <a id="gkcolumnids2601">GKColumnIds Namespace</a>
Some constants of `GKColumnIds` defined in the Land Use and Macro PT plugins were no longer accessible from Python after the move from PyQt to PySide in Aimsun Next 26.0.0. They are now available again:
- From the Land Use plugin: `eGAAttribute`, `eGAVector`, `eGACentroidExternal`, `eGACentroidBalance`, `eGACentroidArea`, `eParkingCapacity`.
- From the Macro PT plugin: `ePTCapacity`, `ePTBoarding`, `ePTAlighting`, `ePTLoad`, `ePTFrequency`, `ePTMeanLoad`, `ePTMaxLoad`, `ePTVCRatio`, `ePTMeanVCRatio`, `ePTMaxVCRatio`, `ePTNumPassengersConsideringTransfers`, `ePTNumTransfers`, `ePTTotalTrackLength`, `ePTTotalPassengerDistance`, `ePTMeanTripDistance`, `ePTAverageSpeed`, `ePTMaxSpeed`, `ePTMinSpeed`, `ePTAccess`, `ePTDwell`, `ePTEgress`, `ePTTransfer`, `ePTTransferExternalFrom`, `ePTTransferExternalTo`, `ePTTransferStation`, `ePTTransferDirectFrom`, `ePTTransferDirectTo`, `ePTTripFrom`, `ePTTripTo`, `ePTWalkOnly`, `ePTWalkOnlyAccess`, `ePTWalkOnlyEgress`.
### <a id="gkexperimentresult2601">GKExperimentResult Class</a>
The file format used to store Skim matrices can now be set and queried. Six formats are supported: Aimsun ASCII, Aimsun Binary, VISUM, OMX, SATURN and EMME.
### <a id="gkreplication2601">GKReplication Class</a>
Skim matrices generated by a replication can now be discovered and retrieved from Python scripts, previously only available from the GUI. `findSkimFiles` returns the relative file names (not absolute paths) of the available Skim matrix files; `retrieveSkimMatrices` restores the given files into the model and returns the resulting matrices. The files are read with the File Format of the Average that uses the replication. If no Average uses it, or more than one does, an error is written to the log and the returned list is empty.
These functions are also available on `GKExperimentResult`, which inherits from `GKReplication`.
### <a id="macroexperiment2601">MacroExperiment Class</a>
Skim and RGap matrices generated by a macro experiment can now be discovered and retrieved from Python scripts, analogous to the functions added to `GKReplication`. `findSkimFiles`/`findRGapFiles` return relative file names, not absolute paths.
## Aimsun Next 26.0.0 changes
Main changes:
- The Python version to use with Next 26 is Python 3.12. The latest full installer available for Python 3.12 is [Python 3.12.10](https://www.python.org/downloads/release/python-31210/) from python.org.
- The library PyANGBasic is no longer available for use, all imports must be removed.
- Aimsun Next 26 uses Qt6, all references to Qt5 functions or imports should be updated to the Qt6 equivalent ones.
- In this version it is compulsory to use the name of the enums to access its value. In previous Next releases it was optional. Examples:
- In Next 24 and previous you could either user: GKColumn.Type._GKTimeSerie or GKColumn._GKTimeSerie. In Next 26 only GKColumn.Type._GKTimeSerie is accepted.
- QVariant does no longer exist.
- The column IDs of GKObjects and GKSimulatedObjects do no longer exist. To set or get the values of all columns the columns should be accessed by its internal name and not by the former ID. Example:
Instead of using:
value = section.getDataValueDoubleByID( GKSection::reactionTimeVariationAtt )
use:
value = section.getDataValueDouble( model.getColumn("GKSection::reactionTimeVariationAtt" ) )
The following is a list of all the classes and functions that have changed or have been added after the release of Aimsun Next 24.0.2. The classes with changes are:
- [ComparisonTypeResultData](#ComparisonTypeResultData2600)
- [DTATurning](#DTATurning2600)
- [GKCentroidSplitCmd](#GKCentroidSplitCmd2600)
- [GKColumnIds](#GKColumnIds2600)
- [GKControlPlanSignalStartDuration](#GKControlPlanSignalStartDuration2600)
- [GKDestinationChange](#GKDestinationChange2600)
- [GKExperimentResult](#GKExperimentResult2600)
- [GKForceEnrouteAssignment](#GKForceEnrouteAssignment2600)
- [GKForceTurning](#GKForceTurning2600)
- [GKFunctionCost](#GKFunctionCost2600)
- [GKGenericScenario](#GKGenericScenario2600)
- [GKModel](#GKModel2600)
- [GKNodeConflict](#GKNodeConflict2600)
- [GKObject](#GKObject2600)
- [GKODMatrix](#GKODMatrix2600)
- [GKParkAndRideChange](#GKParkAndRideChange2600)
- [GKPolygon](#GKPolygon2600)
- [GKPublicLine](#GKPublicLine2600)
- [GKRoadType](#GKRoadType2600)
- [GKSection](#GKSection2600)
- [GKSimulatedObject](#GKSimulatedObject2600)
- [GKSimulationEvent](#GKSimulationEvent2600)
- [GKTriggerCondition](#GKTriggerCondition2600)
- [GKTurning](#GKTurning2600)
- [GKTurningClosingChange](#GKTurningClosingChange2600)
- [GKType](#GKType2600)
- [GKViewModeStyleRange](#GKViewModeStyleRange2600)
- [MacroScenarioOutputData](#MacroScenarioOutputData2600)
### <a id="DTATurning2600">DTATurning Class</a>
The following functions have been removed:
Replaced by (the distinction by vehicle type or user class no longer exists):
The following functions are labelled as obsolete. Please update your scripts to do not use them as they will be removed in the upcoming major release after Next 26.
Replaced by (pass None as the vehicle type if no distinction is needed):
### <a id="GKDestinationChange2600">GKDestinationChange Class</a>
The following functions have been removed:
Replaced by:
### <a id="GKForceEnrouteAssignment2600">GKForceEnrouteAssignment Class</a>
The following attributes have been removed:
Replaced by:
### <a id="GKForceTurning2600">GKForceTurning Class</a>
The following functions have been removed:
Replaced by:
### <a id="GKFunctionCost2600">GKFunctionCost Class</a>
Some types inside the GKFunctionCostType attribute removed:
have been replaced by:
and
have been unified in:
### <a id="GKGenericScenario2600">GKGenericScenario Class</a>
The following functions have been removed:
Replaced by:
### <a id="GKModel2600">GKModel Class</a>
Added function that sets the model in multiple modification mode, which if true avoids the update of the project view each time a single object is added/modified/removed.
WARNING: Use with caution and at your own risk to avoid UI inconsistencies. The function must be called twice with true and false to avoid inconsistencies.
Example of usage:
model.setOnMultipleModifications(False) #notify the model that we finished doing the modifications
This function returns whether the model is in multiple modification mode.
### <a id="GKObject2600">GKObject Class</a>
The column IDs of GKObjects do no longer exist. To set or get the values of all columns the columns should be accessed by its internal name and not by the former ID. Example:
Instead of using:
value = section.getDataValueDoubleByID( GKSection::reactionTimeVariationAtt )
use:
value = section.getDataValueDouble( model.getColumn("GKSection::reactionTimeVariationAtt" ) )
All these functions are no longer available:
void setDataValueObjectByID( uint attrId, const GKObject * obj );
void setDataValueDoubleByID( uint attrId, double v );
void setDataValueByID( uint attrId, const QVariant & v );
void setDataValueInTSByID( uint attrId, unsigned int index, double value, double deviation, GKTSDescription * aDescription = nullptr );
void setDataValueInExpandableTSByID( uint attrId, double value, double deviation, GKTSDescription * aDescription = nullptr );
void setAggregatedValueInTSByID( uint attrId, double value, double deviation, GKTSDescription * aDescription = nullptr );
void clearDataValueTSByID( uint attrId );
void removeDataValueByID( uint attrId );
The following functions should be used instead:
virtual QVariant * getDataValue( const GKColumn * attr, bool * deleteit , const GKContext & context = GKContext::anyContext ) const;
virtual double getDataValueInTS( const GKColumn * attr, unsigned int index, double * deviation = nullptr ) const;
virtual GKTimeSerie * getDataValueTS( const GKColumn * attr ) const;
virtual int getDataValueInt( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
virtual double getDataValueDouble( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
QString getDataValueString( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
virtual bool getDataValueBool( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
virtual GKObject * getDataValueObject( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
QDate getDataValueDate( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
QTime getDataValueTime( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
QDateTime getDataValueDateTime(const GKColumn* attr, const GKContext& context = GKContext::anyContext) const;
GKTimeDuration getDataValueTimeDuration( const GKColumn * attr, const GKContext & context = GKContext::anyContext ) const;
virtual void setDataValueObject( const GKColumn * attr, const GKObject * obj );
virtual void setDataValueDouble( const GKColumn * attr, double v );
virtual void setDataValue( const GKColumn * attr, const QVariant & v );
virtual void setDataValueInTS( const GKColumn * attr, unsigned int index, double value, double deviation, GKTSDescription * aDescription = nullptr );
virtual void setDataValueInTS( const GKColumn * attr, unsigned int index, double value, double deviation, double lowerValue, GKTSDescription * aDescription = nullptr );
virtual void setAggregatedValueInTS( const GKColumn * attr, double value, double deviation, GKTSDescription * aDescription = nullptr );
virtual void clearDataValueTS( const GKColumn * attr );
void removeDataValue( const GKColumn * attr );
```
GKODMatrix Class¶
The following functions, that had in previous releases been marked as obsolete, have been finally removed:
void compress();
void descompress();
bool isCompressed() const;
GKParkAndRideChange Class¶
The following functions have been removed:
void setOrigin( const GKCentroid * centroid );
const GKCentroid * getOrigin() const;
void setDestination( const GKCentroid * centroid );
const GKCentroid * getDestination() const;
Replaced by:
void setOriginCentroidOrGroup( const GKPolygon * centroidOrGroup );
const GKPolygon * getOriginCentroidOrGroup() const;
void setDestinationCentroidOrGroup( const GKPolygon * centroidOrGroup );
const GKPolygon * getDestinationCentroidOrGroup() const;
GKPolygon Class¶
The GKObjectsClassification has been expanded so it is now defined as follows:
enum GKObjectsClassification{
eAll
, eOnlyNodesAndSections
, eOnlySections
, eAllButProblemNets
};
GKRoadType Class¶
The following functions have been removed:
GKFunctionCost* getTurnInitialCostFunction() const;
void setTurnInitialCostFunction( GKFunctionCost* function );
as now the previously existing;
GKFunctionCost* getTurnDynamicCostFunction() const;
void setTurnDynamicCostFunction( GKFunctionCost* function );
are used in all cases.
Also the "GKRoadType::turnInitialCostFunctionAtt" column is no longer available.
GKSection Class¶
The following functions have been removed:
GKFunctionCost * getInitialFunction() const;
void setInitialFunction( GKFunctionCost *fc );
as now the previously existing;
GKFunctionCost * getDynamicFunction() const;
void setDynamicFunction( GKFunctionCost * fc );
are used in all cases.
Also the initialFunctionAtt column identifier has been removed as the "GKSection::initialFunctionAtt" column is no longer available.
GKSimulatedObject Class¶
The column IDs of GKObjects do no longer exist. To set or get the values of all columns the columns should be accessed by its internal name and not by the former ID. Example: Instead of using: value = section.getDataValueDoubleByID( GKSection::reactionTimeVariationAtt ) use: value = section.getDataValueDouble( model.getColumn("GKSection::reactionTimeVariationAtt" ) ) All these functions are no longer available in GKSimulatedObjects: ``` QVariant * getDataValueByID( uint attrId, bool * deleteit , const GKContext & context = GKContext::anyContext) const override; double getDataValueInTSByID( uint attrId, unsigned int index, double * deviation = nullptr ) const; GKTimeSerie * getDataValueTSByID( uint attrId ) const; int getDataValueIntByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; double getDataValueDoubleByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; QString getDataValueStringByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; bool getDataValueBoolByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; GKObject * getDataValueObjectByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; QDate getDataValueDateByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; QTime getDataValueTimeByID( uint attrId, const GKContext & context = GKContext::anyContext ) const; QDateTime getDataValueDateTimeByID(uint attrId, const GKContext& context = GKContext::anyContext) const; GKTimeDuration getDataValueTimeDurationByID( uint attrId, const GKContext & context = GKContext::anyContext ) const;
The following functions should be used instead:
### <a id="GKSimulationEvent2600">GKSimulationEvent Class</a>
GKSimulatorEvent now allows to set different time triggers for different time intervals and to set a minimum duration before checking the stop trigger.
The following function has been removed:
The following functions have been added:
### <a id="GKTriggerCondition2600">GKTriggerCondition Class</a>
The functions
have change their signature to
### <a id="GKTurning2600">GKTurning Class</a>
The following functions have been removed:
as now the previously existing;
are used in all cases.
Also the initialFunctionAtt column identifier has been removed as the "GKTurning::initialFunctionAtt" column is no longer available.
### <a id="GKTurningClosingChange2600">GKTurningClosingChange Class</a>
The following functions have been removed:
Replaced by:
### <a id="GKType2600">GKType Class</a>
As stated in Next 24, the functions to add GKColumn to a GKType
GKColumn* addColumn( const GKContents& contents , GKColumn::Type atype, GKColumn::GKColumnType astoreType = GKColumn::eExternalTemporary, bool dynamic = false );
GKColumn * addColumn( const QString & iname, const QString & aname, GKColumn::Type atype, GKColumn::GKColumnType astoreType = GKColumn::eExternal, bool dynamic = false );
have been discontinued. The ones below are the ones that substitute them:
- Adds a GKColumn with store type GKColumn::eExternal.
- Adds a GKColumn with store type GKColumn::eExternalTemporary.
- Adds a GKColumn with store type GKColumn::ePython.
### <a id="GKCentroidSplitCmd2600">GKCentroidSplitCmd Class</a>
The class `GKCentroidSplitCmd` has been added.
A command to split a Centroid in multiple ones.
### <a id="GKControlPlanSignalStartDuration2600">GKControlPlanSignalStartDuration Class</a>
The following functions have been removed:
They were not intended to update the control plan signal start and duration. To change the values in the control junction, use GKControlJunction::setPhasesFromSignals.
### <a id="GKExperimentResult2600">GKExperimentResult Class</a>
Skim matrices storage options are now available:
Storing Skim matrices is disabled by default. Current status can be checked and modified with the following functions:
Aggregate Route Choice Interval is disabled by default. Check current status and modify it with the following functions:
Aggregate by vehicle class is disabled by default. Check current status and modify it with the following functions:
Include Warm-up is disabled by default. Check current status and modify it with the following functions:
Calculate Cost for Zero Trips is disabled by default. Check current status and modify it with the following functions:
When the Average is calculated, store its Replication Skim Matrices too. Disabled by default. Check current status and modify it with the following functions:
Current Route Choice Intervals can be retrieved using the following function. The intervals are expressed in seconds.
Sets the Route Choice Intervals to be used when generating the Skim Matrices. The intervals must be expressed in seconds.
The following requisites must be met for the intervals to be actually assigned:
The option "Aggregate Route Choice Interval" is enabled
The scenario has a demand
The duration of the intervals equals the scenario's duration
All intervals are multiple of the experiment's interval duration
Clears the Route Choices Intervals defined with *setRouteChoiceIntervals* function.
### <a id="MacroScenarioOutputData2600">MacroScenarioOutputData Class</a>
The following functions have been added:
Returns true if the skim matrices to generate must be the aggregate result of each Vehicle Class.
Sets whether skim matrices to generate must be aggregated by Vehicle Class.
Returns true if the RGap matrices will be generated at the end of the execution and false otherwise.
Sets whether Gap matrices will be generated at the end of the assignment process.
### <a id="GKViewModeStyleRange2600">GKViewModeStyleRange Class</a>
The following functions have been added:
Sets the value for this range when the style's attribute is of type GKColumn::String
Returns the value for this range when the style's attribute is of type GKColumn::String
### <a id="GKPublicLine2600">GKPublicLine Class</a>
The following functions have been added to assign and retrieve OCIT information:
int getOcitRouteNumber() const; void setOcitRouteNumber( int value );
int getOcitTrainLength() const; void setOcitTrainLength(int value);
void setSREMRole( int role ); int getSREMRole() const;
void setSREMSubrole( int value ); int getSREMSubrole() const;
### <a id="GKNodeConflict2600">GKNodeConflict Class</a>
The following functions have been removed:
double getXIni1() const; double getXIni2() const;
void setXIni1(double x); void setXIni2(double x);
double getXEnd1() const; double getXEnd2() const;
void setXEnd1(double x); void setXEnd2(double x);
Replaced by:
double getFirstEntityXIni() const; double getSecondEntityXIni() const;
void setFirstEntityXIni(double x); void setSecondEntityXIni(double x);
double getFirstEntityXEnd() const; double getSecondEntityXEnd() const;
void setFirstEntityXEnd(double x); void setSecondEntityXEnd(double x);
### <a id="ComparisonTypeResultData2600">ComparisonTypeResultData Class</a>
The following functions have been removed:
Replaced by:
### <a id="GKColumnIds2600">GKColumnIds Namespace</a>
The following GKColumnIds have been replaced by:
- eOutputCount is now eEntryBasedCount.
- New column Ids for the entry-based statistics have been added:
eEntryBasedSpeed, eEntryBasedSpeedMeso, eEntryBasedTravelTime for the micro and eEntryBasedTravelTimeMeso for the meso,eEntryBasedDelayTime for the micro and eEntryBasedDelayTimeMeso for the meso, eEntryBasedFlow.
- eDwellTime is now eExitBasedDwellTime.
## Aimsun Next 24.0.1 changes
The following is a list of all the classes and functions that have changed or have been added after the release of Aimsun Next 24.0.0 Final release. The classes with changes are:
- [GKObject](#GKObject2401)
### <a id="GKObject2401">GKObject Class</a>
The functions
have change their signature to
and now only clear existing Time Series on the provided column. The logic for extra initialization has been moved to a new function.
A new function for creation and initialization of a Time Series has been added with the following signature:
This function only creates the Time Series if the associated column didn't have a time serie already created. If already existing, the function will return the Time Series without doing any change to its values.
## Aimsun Next 24 changes
The following is a list of all the functions that have changed between Aimsun Next 23 and Aimsun Next 24 in order to help update old scripts easily. The classes with changes are:
- [GKControllerParsOCIT](#GKControllerParsOCIT2400)
- [GKControllerParsVSPLUS](#GKControllerParsVSPLUS2400)
- [GKControllerParsSitrafficOffice](#GKControllerParsSitrafficOffice2400)
- [GKControlJunction](#GKControlJunction2400)
- [GKFilePath](#GKFilePath2400)
- [GKFunctionCostContext](#gkfunctioncostcontext24)
- [GKNode](#gknode2400)
- [GKObject](#GKObject2400)
- [GKTrafficDemand](#gktrafficdemand2400)
- [GKTrafficState](#gktrafficstate2400)
- [GKScenarioInputData](#GKScenarioInputData2400)
- [GKSection](#GKSection2400)
- [GKSystem](#GKSystem2400)
- [DynamicDepartureAdjustmentExperimentResult](#DynamicDepartureAdjustmentExperimentResult2400)
- [DynamicDepartureAdjustmentExperimentResultOutput](#DynamicDepartureAdjustmentExperimentResultOutput2400)
- [MacroExperimentParams](#MacroExperimentParams2400)
### <a id="GKControllerParsOCIT2400">GKControllerParsOCIT Class</a>
The signature of the following functions:
has been replaced by:
### <a id="GKControllerParsVSPLUS2400">GKControllerParsVSPLUS Class</a>
The type of the following members:
has changed to:
### <a id="GKControllerParsSitrafficOffice2400">GKControllerParsSitrafficOffice Class</a>
The signature of the following functions:
has been replaced by:
### <a id="GKFilePath2400">GKFilePath Class</a>
The GKFilePath class has been added. A filesystem path for a file in the project with some utility functions.
### <a id="gkfunctioncostcontext24">GKFunctionCostContext Class</a>
The attributes that were deprecated ( experiment, userClass, time, timeSta and iteration) have been removed and they need to be accessed using the functions that are provided.
### <a id="gknode2400">GKNode Class</a>
The signature of the function `getMinimalPolygons` has been modified, now it has a third optional parameter `curvedGeometry` to get the polygons with curved or straight lines joining the sections.
### <a id="GKObject2400">GKObject Class</a>
The signature of the function `clone` has been modified, now it has a second optional parameter `temporary`.
### <a id="gktrafficdemand2400">GKTrafficDemand Class</a>
The function `getTotalTrips now works with OD Matrices and Traffic States.
### <a id="gktrafficstate2400">GKTrafficState Class</a>
The following function has been added:
### <a id="GKScenarioInputData2400">GKScenarioInputData Class</a>
The signature of the following function:
has been replaced by:
### <a id="GKSection2400">GKSection Class</a>
The following functions to query the state of the geometry given a scenario or experiment have been added:
GKNode * getOrigin( const GKGenericExperiment experiment ) const; GKNode * getDestination( const GKGenericExperiment experiment ) const;
### <a id="GKSystem2400">GKSystem Class</a>
The following function has changed behaviour:
Now it only replaces the path for $APP_HOME and $PLUGINS_HOME. For $MODEL_HOME use a relative path.
### <a id="DynamicDepartureAdjustmentExperimentResult2400">DynamicDepartureAdjustmentExperimentResult Class</a>
The `DynamicDepartureAdjustmentExperimentResult` class has been added. Represents a Dynamic OD Departure Time Rescheduling Result.
### <a id="DynamicDepartureAdjustmentExperimentResultOutput2400">DynamicDepartureAdjustmentExperimentResultOutput Class</a>
The `DynamicDepartureAdjustmentExperimentResultOutput` class has been added. Represents a Dynamic OD Departure Time Rescheduling Result Output.
### <a id="MacroExperimentParams2400">MacroExperimentParams Class</a>
The following functions have been added:
virtual void setBiCriteriaEnabled( bool enabled ); virtual void resetTollAttributes(); virtual void setSectionTollAttr( const GKUserClass user, GKColumn col ); virtual void setTurningTollAttr( const GKUserClass user, GKColumn col );
### <a id="GKControlJunction2400">GKControlJunction Class</a>
A new parameter has been added for actuated junctions with coordinated phases to define how to apply the offset parameter:
void setOffsetReferencePoint(OffsetReferencePoint referencePoint ); OffsetReferencePoint getOffsetReferencePoint() const;
These replace the following functions:
All previous uses must be replaced as follows:
junction.setMatchesOffsetWithEndOfPhase(true);¶
junction.setOffsetReferencePoint(GKControlJunction.eEndOfFirstCoordinatedPhase);
junction.setMatchesOffsetWithEndOfPhase(false);¶
junction.setOffsetReferencePoint(GKControlJunction.eBeginningOfFirstCoordinatedPhase);
## Aimsun Next 23.0.1 changes
The following is a list of all the classes and functions that have changed or have been added after the release of Aimsun Next 23 Final Release. The classes with changes are:
- [GKCentroidConfiguration](#GKCentroidConfiguration2301)
- [GKPedestrianCentroidConfiguration](#GKPedestrianCentroidConfiguration2301)
- [GKPTZonePlan](#GKPTZonePlan2301)
- [NSPReader](#NSPReader2301)
### <a id="GKCentroidConfiguration2301">GKCentroidConfiguration Class</a>
The signature of the following functions:
has been replaced by:
### <a id="GKPedestrianCentroidConfiguration2301">GKPedestrianCentroidConfiguration Class</a>
The signature of the following function:
has been replaced by:
### <a id="GKPTZonePlan2301">GKPTZonePlan Class</a>
The signature of the following function:
has been replaced by:
### <a id="NSPReader2301">NSPReader Class</a>
The NSPReader and related NSPTreeStats classes have been discontinued. If you need to retrieve information from and APA file check the following [example](RetrieveAPAExample.md).
## Aimsun Next 23 changes
The following is a list of all the functions that have changed between Aimsun Next 22 and Aimsun Next 23 in order to help update old scripts easily. The classes with changes are:
- [GAnyObjectChooser](#GAnyObjectChooser23)
- [GKCentroid](#gkcentroid23)
- [GKCentroidSplitConnectionToNodeCmd](#GKCentroidSplitConnectionToNodeCmd23)
- [GKColumn](#GKColumn23)
- [GKControlPlan](#GKControlPlan23)
- [GKControllerDetector](#GKControllerDetector23)
- [GKSCOOTControllerDetector](#GKSCOOTControllerDetector23)
- [GKSCATSControllerDetector](#GKSCATSControllerDetector23)
- [GKSCATSRMSControllerDetector](#GKSCATSRMSControllerDetector23)
- [OCITControllerDetector](#OCITControllerDetector23)
- [SiTrafficApValue](#SiTrafficApValue23)
- [GKDrawer](#gkdrawer23)
- [GKDynamicAdjustmentExperiment](#dynamicAdjustmentExperiment23)
- [GKFunctionCostContext](#gkfunctioncostcontext23)
- [GKGenerationAttractionVector](#gavector23)
- [GKGeoObject](#gkgeoobject23)
- [GKModel](#gkmodel23)
- [GKNode](#gknode23)
- [GKObject](#gkobject23)
- [GKODMatrix](#gkodmatrix23)
- [GKPolygon](#gkpolygon23)
- [GKRoadType](#gkroadtype23)
- [GKRoute](#gkroute23)
- [GKScenarioInputData](#gkscenarioinputdata23)
- [GKSimulationArea](#gksimarea23)
- [GKTask](#GKTask23)
- [GKTimeSerie](#GKTimeSerie23)
- [GKTraversal](#gktraversal23)
- [GKType](#GKType23)
- [DTAManager](#DTAManager23)
- [CMacroStatsManager](#macroStatsManager23)
- [MacroAdjustmentExperiment](#macroadjustmentexperiment23)
- [MacroAdjustmentOutput](#macroAdjustmentOutput23)
- [MacroPTAdjustmentScenarioOutputData](#macroptadjustmentscenariooutputdata23)
- [MacroPTExperimentParams](#macroPTExperimentParams23)
- [MacroPTAdjustmentResult](#macroPTAdjustmentResult23)
- [PTResultAdjustmentState](#ptResultAdjustmentState23)
- [GradientIterationValidationData](#gradientIterationData23)
- [OuterIterationValidationData](#outerIterationData23)
- [DistributionOutput](#distributionOutput23)
- [DistributionScenario](#distributionScenario23)
- [NodeCompositor](#nodeCompositor23)
- [FourStepLoop](#fourStepLoop23)
- [FourStepLoopParams](#fourStepLoopParams23)
- [FourStepLoopOutputs](#fourStepLoopOutputs23)
### <a id="GAnyObjectChooser23">GAnyObjectChooser Class</a>
The following function signature has changed from
to
The chooser is no longer set by calling
now you need to call
### <a id="gkcentroid23">GKCentroid Class</a>
The following function that was receiving a scenario ID receives now the scenario object:
### <a id="GKCentroidSplitConnectionToNodeCmd23">GKCentroidSplitConnectionToNodeCmd Class</a>
The class GKCentroidSplitConnectionToNodeCmd has been added.
A command to move Centroid Connections from nodes to sections. All connections to/from nodes will be converted to connections to/from the sections connected to that node.
##### setCentroid function
### <a id="GKColumn23">GKColumn Class</a>
Information about a GKColumn origin has been added. The following options are recognized:
enum Origin { eUnknown, eDeveloper, eImporter, eUI, eScript };
This information can be set using the following function:
To retrieve it, the following functions are available:
QString getOriginDescription() const;
The following functions have been added to set/get the floating point precision when storing and displaying the value:
### <a id="GKControlPlan23">GKControlPlan Class</a>
The following functions have been removed as they are no longer needed:
### <a id="GKControllerDetector23"> GKControllerDetector Class</a>
From now on member "detector" is only available via the following functions:
#### getDetector
#### setDetector
GKControllerDetector has been split into specialized classes, so the following functions are no longer available:
These have been moved to GKSCOOTControllerDetector(#GKSCOOTControllerDetector) class.
These have been moved to GKSCATSControllerDetector(#GKSCATSControllerDetector) class.
int getLane() const;
void setLane( int alane );
``` These have been moved to GKSCATSRMSControllerDetector(#GKSCATSRMSControllerDetector) class.
GKSCOOTControllerDetector Class¶
Specialization of GKControllerDetector specific to Yunex UTC controllers.
setType¶
void setType( Type value );
getType¶
Type getType() const;
GKSCATSControllerDetector Class¶
Specialization of GKControllerDetector specific to SCATS controllers.
getSPIP¶
bool getSPIP() const;
setSPIP¶
void setSPIP( bool sp );
GKSCATSRMSControllerDetector Class¶
Specialization of GKControllerDetector specific to SCATS-RMS controllers.
getName¶
const QString & getName() const;
setName¶
void setName( const QString & aname );
getLane¶
int getLane() const;
setLane¶
void setLane( int alane );
OCITControllerDetector Class¶
Specialization of GKControllerDetector specific to OCIT controllers.
addLine¶
void addLine( GKPublicLine* line, GKBusStop* stop, double secondsBeforeDeparture );
getBusStop¶
GKBusStop* getBusStop( GKPublicLine* line );
getSecondsBeforeDeparture¶
double getSecondsBeforeDeparture( GKPublicLine* transitLine );
setCallingPointType¶
void setCallingPointType( Type type );
getCallingPointType¶
Type getCallingPointType() const;
SiTrafficApValue Class¶
Class SiTrafficApValue has been renamed into OCITApValue
GKDrawer Class¶
The function isHidden now takes a const GView *.
isHidden¶
virtual bool isHidden( const GView * view ) const;
GKDynamicAdjustmentExperiment Class¶
Two member functions have been added to allow setting and getting the centroid grouping used:
setCentroidGrouping function¶
void setCentroidGrouping( GKGroupingType* iCentroidGrouping );
getCentroidGrouping function¶
GKGroupingType* getCentroidGrouping() const;
The following function call to set the minimum state threshold has been removed:
setStateThreshold¶
void setStateThreshold( double iValue );
GKFunctionCostContext Class¶
The attribute userClass is not recommended to access the GKMobileAgent nor the GKTripPurpose. In order to access the vehicle type and purpose, two new functions can be used:
GKMobileAgent * getVehicle() const;
GKTripPurpose * getPurpose() const;
GKGenerationAttractionVector Class¶
The following functions have been added to complete the interface of this class:
setCentroidConfiguration¶
void setCentroidConfiguration( GKCentroidConfiguration * cent );
setCarAvailability¶
void setCarAvailability( const int iCarAvailability );
GKGeoObject Class¶
The following function that was receiving a scenario ID receives now the scenario object:
virtual bool exists( const GKGenericScenario * scenario ) const;
GKModel Class¶
getActiveScenarioId¶
Function name changed:
quint32 getActiveScenarioId() const;
to
const GKGenericScenario* getActiveScenario() const;
GKNode Class¶
The following function that was receiving a scenario ID receives now the scenario object:
uint getSignalPos( uint /*idSignal*/, const GKGenericScenario * scenario = nullptr ) const;
GKObject Class¶
The following function have been added to complete the interface of this class:
cloneAsTemporary¶
virtual GKObject * cloneAsTemporary( bool addItToModel = true ) const;
GKODMatrix Class¶
The summary information has been added as Columns. The following new attributes can be used to access them:
static uint minimumValueAtt;
static uint maximumValueAtt;
static uint emptyCellsCountAtt;
static uint nonEmptyCellsCountAtt;
static uint totalValueAtt;
static uint diagonalTotalValueAtt;
The following functions have been added:
```
/* Change matrix internal structure to sparse. Uses less memory if the data has a lot of zeros. /
void setMatrixSparse();
/* Calculate the summary info. * @param canAskUser If true and the external file cannot be found, a dialog asking for the location will be shown. / void calculateSummary( bool canAskUser = true ) const;
/* Invalidates current summary. / void invalidateSummary() const;
GKODMatrix& operator +=(const GKODMatrix & iMatrix);
The function ensureMatrixData has a new optional parameter:
### <a id="gkpolygon23">GKPolygon Class</a>
The following functions that were receiving a scenario ID receive now the scenario object:
### <a id="gkroadtype23">GKRoadType</a>
The attribute additionalVolumeAtt has been renamed to sectionAdditionalVolumeAtt.
The following attributes have been added:
### <a id="gkroute23">GKRoute Class</a>
The following function that was receiving a scenario ID receives now the scenario object:
### <a id="gkscenarioinputdata23">GKScenarioInputData Class</a>
Several obsolete functions that were not used when defining the scenario output setting have been removed. The exhaustive list of functions no longer available is:
### <a id="gksimarea23">GKSimulationArea Class</a>
The following function that was receiving a scenario ID receives now the scenario object:
### <a id="GKTask23">GKTask Class</a>
The following function have been added to give access to the unique identifier of a task:
### <a id="GKTimeSerie23">GKTimeSerie Class</a>
GKTimeSerie has changed from a dimension + position base to a position base. The GKTimeSerieIndex has disappeared and now only position is used (as unsigned int).
As an example, the function setValue has changed from:
to
All references to dimensions, including the call to:
have been erased.
A minor note: most output and input values that cannot be negative have been changed from int to unsigned int.
The get aggregated methods, like the sum, have been changed and now they do not accept direct QDateTime values as parameters. As the functions allow a start/end index to the interval, this should be enough.
The functions that used to have a time series reference (&) as a parameter now have a time series pointer instead (*).
Added two functions that allow for the acquisition and check of the null value of the given time series, as it can be different based on the description.
The full list of functions that have disappeared or changed in some way is:
Please read the GKTimeSerie sip file documentation for further details.
### <a id="gktraversal23">GKTraversal Class</a>
The following functions that were receiving a scenario ID receive now the scenario object:
### <a id="GKType23">GKType Class</a>
It is no longer possible to use the following functions to add GKColumn to a GKType
GKColumn* addColumn( const GKContents& contents , GKColumn::Type atype,
GKColumn::GKColumnType astoreType = GKColumn::eExternalTemporary, bool dynamic = false );
GKColumn * addColumn( const QString & iname, const QString & aname, GKColumn::Type atype,
GKColumn::GKColumnType astoreType = GKColumn::eExternal, bool dynamic = false );
instead use the ones ahead...
- Adds a GKColumn with store type GKColumn::eExternal.
GKColumn * addExternalColumn( const QString & iname, const QString & aname, GKColumn::Type atype, GKColumn::Origin from = GKColumn::eDeveloper, const QString& originDescription = QString(), bool dynamic = false, int precision = -1 );
- Adds a GKColumn with store type GKColumn::eExternalTemporary.
GKColumn * addTemporaryColumn( const QString & iname, const QString & aname, GKColumn::Type atype, bool dynamic = false, int precision = -1 );
GKColumn * addTemporaryColumn( const QString & iname, const GKContents& contents , GKColumn::Type atype, bool dynamic = false, int precision = -1 );
GKColumn * addTemporaryColumn( const GKContents& contents, GKColumn::Type atype, bool dynamic = false, int precision = -1 );
- Adds a GKColumn with store type GKColumn::ePython.
GKColumn * addPythonFunctionColumn( const GKContents& contents, GKColumn::Type atype, int precision = -1 );
GKColumn * addPythonFunctionColumn( const QString & iname, const QString & aname, GKColumn::Type atype, int precision = -1 );
```
DTAManager Class¶
The following function has been removed:
DTAVehicleType * getVehicleType(const DTAUserClass * userclass) const;
All previous uses of that function can now use the existing:
const DTAVehicleType * getDTAVehicleType() const;
found in the DTAUserClass inside the GKContext.
Example of usage:
context.userClass.getDTAVehicleType()
CMacroStatsManager Class¶
The following functions have been added in order to access the aggregate statistics output from a Static Assignment through the CMacroStatsManager:
getTotalSectionVolume¶
double getTotalSectionVolume( const GKSection& iSection, const bool iWeightedByPCU = true ) const;
getTotalSectionOccupancy¶
double getTotalSectionOccupancy( const GKSection& iSection ) const;
getTotalSectionCost¶
double getTotalSectionCost( const GKSection& iSection, const bool iWeightedByPCU = true ) const;
getTotalSectionCostComponent¶
``` double getTotalSectionCostComponent( const GKSection& iSection, const GKFunctionComponent& iComponent, const bool iWeightedByPCU = true ) const;
#### getTotalTurningVolume
#### getTotalTurningPercentage
#### getTotalTurningCost
#### getTotalTurningCostComponent
#### getTotalTrajectoryVolume
#### getTotalTrajectoryPercentage
#### getTotalTrajectoryCost
#### getTotalTrajectoryCostComponent
#### getTotalConnectionVolume
#### getTotalConnectionCost
#### getTotalConnectionCostComponent
#### getTotalRouteVolume
#### getTotalRouteCost
#### getTotalRouteCostComponent
#### getTotalDetectorVolume
### <a id="macroadjustmentexperiment23">MacroAdjustmentExperiment Class</a>
The following functions have been added:
#### getTargetSlopeDev function
#### getTargetSlopeDev function
### <a id="macroAdjustmentOutput23">MacroAdjustmentOutput Class</a>
The following functions have been removed:
Now all data related to convergence via the MacroAdjustmentIterationLog.
### <a id="macroptadjustmentscenariooutputdata23">MacroPTAdjustmentScenarioOutputData Class</a>
The following function that was receiving a experiment ID receives now the experiment object:
### <a id="ptResultAdjustmentState23"> PTResultAdjustmentState Class</a>
This class has been added to help users access the original and adjusted demand, which groups the following data:
#### Origin Centroid
#### Destination Centroid
#### User Class
#### Original Demand
#### Adjusted Demand
### <a id="macroPTAdjustmentResult23"> MacroPTAdjustmentResult Class</a>
The way the original and adjusted demand values are accessed has changed.
The following function has been removed:
#### getStates
And the following functions have been added to provide improved access to the same data:
#### getNumberOfStates
#### getState
#### findState
### <a id="macroPTExperimentParams23"> MacroPTExperimentParams Class</a>
The following functions have been added:
#### walkingOnlyFunction
#### setWalkingOnlyFunction
### <a id="gradientIterationData23">GradientIterationValidationData Class</a>
A new member variable has been added:
Additionally, the member variable called "regression", has changed from:
to
To specify which information contains.
### <a id="outerIterationData23">OuterIterationValidationData Class</a>
The "AssignmentData" class has been added to hold just the relevant data from a Static Assignment for this class. Because of this, a member variable "assign_data" has been added:
Additionally, the member variable called "regression", has changed from:
to
To specify which information contains.
### <a id="distributionOutput23"> DistributionOutput Class</a>
Several functions have been added to complete the scripting of this class and grant access to all the data it contains:
#### getNumberOfIndices
#### createMatrix
#### getTripPurpose
#### getModes
#### getCarAvailability
#### getAverageImpedance
#### getNumberOfIterations
#### getEpsilon
#### getResidual
#### getRelativeGap
#### getError
### <a id="distributionScenario23">DistributionScenario Class</a>
The following functions have been added to allow the edition of which vectors are added and which used in the DistributionScenario:
#### addVector
#### setUsedVector
#### removeVector
#### hasVector
#### setUsedVector
#### isUsed
#### getVectors
### <a id="nodeCompositor23">NodeCompositor Class</a>
The following method has been added in order to acces exclusively to the Four-Step Loops included in the compositor:
#### getLoops
### <a id="fourStepLoop23">FourStepLoop Class</a>
This class has been added and represents a Loop Controller Box and has all methods in NodeCompute plus the following ones available:
#### setLoopParams
#### getLoopParams
#### getLoopOutputs
#### getNodesInLoop
### <a id="fourStepLoopParams23">FourStepLoopParams Class</a>
This class has been added and represents the parameters which can be configured in the Loop Controller Box.
### <a id="fourStepLoopOutputs23">FourStepLoopOutputs Class</a>
This class has been added and represents the outputs which can be generated from the Loop Controller Box.
## 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](#macroDepartureAdjustmentOutput)
- [GKFunctionCost](#functionCost2201)
- [GKFunctionCostContext](#functionCostContext2201)
- [CMacroStatsManager](#macroStatsManager)
- [MacroPTAdjustmentResult](#macroPTAdjustmentResults22)
- [MacroPTStatsView](#ptStatsView2)
- [MacroPTPlugin](#ptPlugin)
- [GKGenerationAttractionDataSet](#gadataset)
- [GKScriptNewCmd](#GKScriptNewCmd)
- [GKSection](#gksection2201)
### <a id="macroDepartureAdjustmentOutput">MacroDepartureAdjustmentOutput Class</a>
##### createWarmupTrafficDemand
The following function has been added to generate just the warm-up demand:
### <a id="functionCost2201">GKFunctionCost Class</a>
##### evaluateAdjustmentWeight
The signature of this function has been changed from:
to:
### <a id="functionCostContext2201">GKFunctionCostContext Class</a>
- The class `GKFunctionCostContext` now includes an iteration field which contains the static assignment iteration at which the function is being evaluated.
### <a id="macroStatsManager">CMacroStatsManager Class</a>
The following functions have been added to provide all the users and vehicles used in the stats:
##### getUsers function
##### getVehicles function
The following functions have been added to give access to all the statistics of this class:
##### getSectionVolume function
##### getSectionVehicleVolume function
##### getSectionOccupancy function
##### getSectionCost function
##### getSectionCostComponent function
##### getTurningVolume function
##### getTurningVehicleVolume function
##### getTurningPercentage function
##### getTurningCost function
##### getTurningCostComponent function
##### getTrajectoryVolume function
##### getTrajectoryVehicleVolume function
##### getTrajectoryPercentage function
##### getTrajectoryCost function
##### getTrajectoryCostComponent function
##### getConnectionVolume function
##### getConnectionVehicleVolume function
##### getConnectionCost function
##### getConnectionCostComponent function
##### getRouteVolume function
##### getRouteVehicleVolume function
##### getRouteCost function
##### getRouteCostComponent function
##### getDetectorVolume function
##### getDetectorVehicleVolume function
### <a id="macroPTAdjustmentResults22"> MacroPTAdjustmentResult Class</a>
The following functions have been added to give access to the demand adjusted via scripting:
##### getUsers function
##### publishAdjustedDemand function
##### publishMatrix function
### <a id="ptStatsView2"> MacroPTStatsView Class</a>
The following methods have been added in order to obtain the statistics from Centroids and Centroid connections:
##### getCentroidAccess function
##### getCentroidEgress function
##### getCentroidWalkOnlyAccess function
##### getCentroidWalkOnlyEgress function
##### getConnectionLoad function
##### getConnectionAccess function
##### getConnectionEgress function
##### getConnectionWalkOnlyAccess function
##### getConnectionWalkOnlyEgress function
### <a id="ptPlugin"> MacroPTPlugin Class</a>
The following column ids have been added in order to collect the statistics of Walking-Only Access and Walking-Only Egress in GKColumns:
##### ePTWalkOnlyAccess
##### ePTWalkOnlyEgress
### <a id="gadataset"> GKGenerationAttractionDataSet Class</a>
The following function has been added to give access to the external data contained in the class:
##### getExternalData
### <a id="GKScriptNewCmd">GKScriptNewCmd Class</a>
Now it is possible to create different types of GKScript objects using the following function:
- 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.
### <a id="gksection2201"> GKSection Class</a>
The following function has been added to extract lane contour points:
##### getExtremePointsLane function
## 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](#gkModel)
- [ModalSplitScenario](#modalSplitScenario)
- [ModalSplitOutput](#ModalSplitOutput)
- [ModalSplitTripMatricesUtil](#modalSplitTripMatricesUtil)
- [DistributionScenario](#distributionScenario)
- [GravityModelParams](#gravityModelParams)
- [GKLandUseModesUtil](#landUseModesUtil)
- [GKLandUseSkimMatricesUtil](#landUseSkimMatricesUtil)
- [SkimDataProvider](#skimDataProvider)
- [MacroPTExperimentParams](#macroPTExperimentParams)
- [MacroPTAdjustmentScenarioOutputData](#MacroPTAdjustmentScenarioOutputData)
- [GKDistributionDataSet](#GKDistributionDataSet)
- [CentroidDistributionData](#CentroidDistributionData)
- [MacroExperimentOutputData](#MacroExperimentOutputData)
- [GKGenerationAttractionScenario](#GKGenerationAttractionScenario)
- [GKGenerationAttractionCentroidType](#GKGenerationAttractionCentroidType)
- [GKGenerationAttractionData](#GKGenerationAttractionData)
- [GKGenerationAttractionFactor](#GKGenerationAttractionFactor)
- [GKGenerationAttractionDataSet](#GKGenerationAttractionDataSet)
- [CentroidGenerationAttractionData](#CentroidGenerationAttractionData)
- [GKDistributionCentroidType](#GKDistributionCentroidType)
- [GKControlPlan](#GKControlPlan)
- [GKControlPhase](#GKControlPhase)
- [GKControlPhaseSignal](#GKControlPhaseSignal)
- [NodeOutput](#nodeOutput)
- [NodeSlot](#nodeSlot22)
- [NodeConnection](#nodeConnection22)
- [Yutraffic Classes](#sitraffic)
### <a id="gkModel">GKModel Class</a>
##### setActiveExperimentId function
Function name changed:
to
##### getActiveExperimentId function
Function name changed:
to
##### setActiveReplicationId function
Function name changed:
to
##### getActiveReplicationId function
Function name changed:
to
### <a id="modalSplitScenario">ModalSplitScenario Class</a>
##### setDataSet function
Function signature has changed from:
to
##### getComponentSkim function
Function signature has changed from:
to
##### setComponentSkim function
Function signature has changed from:
to
##### removeComponentSkim function
Function signature has changed from:
to
##### getUserDefinedSkim function
Function signature has changed from:
to
##### setUserDefinedSkim function
Function signature has changed from:
to
##### removeUserDefinedSkim function
Function signature has changed from:
to
##### getAllSkims function
Function signature has changed from:
to
### <a id="ModalSplitOutput">ModalSplitOutput Class</a>
##### getTripPurposes function
Function signature has changed from:
to
##### getVehicles function
Function signature has changed from:
to
##### getUsers function
Function signature has changed from:
to
##### getModalSplit function
Function signature has changed from:
to
##### getTimePeriod function
Function signature has changed from:
to
### <a id="modalSplitTripMatricesUtil">ModalSplitTripMatricesUtil Class</a>
##### tripMatrices function
Function signature has changed from:
to
##### usedTripMatrices function
Function signature has changed from:
to
##### tripMatrixData function
Function signature has changed from:
to
##### setUsedTripMatrices function
Function signature has changed from:
to
##### modes function
Functions:
are replaced by
### <a id="distributionScenario">DistributionScenario Class</a>
##### getSkim function
Function signature has changed from:
to
##### setSkim function
Function signature has changed from:
to
##### removeSkim function
Function signature has changed from:
to
##### getComponentSkim function
Function signature has changed from:
to
##### setComponentSkim function
Function signature has changed from:
to
##### removeComponentSkim function
Function signature has changed from:
to
##### getUserDefinedSkim function
Function signature has changed from:
to
##### setUserDefinedSkim function
Function signature has changed from:
to
##### removeUserDefinedSkim function
Function signature has changed from:
to
##### getAllSkims function
Function signature has changed from:
to
### <a id="gravityModelParams">GravityModelParams Class</a>
##### setDeterrenceFunctionId function
Function changed from:
to
##### getDeterrenceFunctionId function
Function changed from:
to
### <a id="landUseModesUtil">GKLandUseModesUtil Class</a>
##### setObject function
Function signature has changed from:
to
##### object function
Function signature has changed from:
to
##### addMode function
Function signature has changed from:
to
##### contains function
Function signature has changed from:
to
##### modes function
Function signature has changed from:
to
##### addMacroComponent function
Function signature has changed from:
to
##### skims function
Function signature has changed from:
to
### <a id="landUseSkimMatricesUtil">GKLandUseSkimMatricesUtil Class</a>
##### transportationMode function
Function signature has changed from:
to
##### setCostSkim function
Function signature has changed from:
to
##### costSkim function
Function signature has changed from:
to
##### setDistanceSkim function
Function signature has changed from:
to
##### distanceSkim function
Functions:
are replaced by
##### setTravelTimeSkim function
Function signature has changed from:
to
##### travelTimeSkim function
Functions:
are replaced by
##### travelTimeSkim function
Functions:
are replaced by
##### setInVehicleTimeSkim function
Function signature has changed from:
to
##### inVehicleTimeSkim function
Functions:
are replaced by
##### setWaitingTimeSkim function
Function signature has changed from:
to
##### waitingTimeSkim function
Functions:
are replaced by
##### setWalkingTimeSkim function
Function signature has changed from:
to
##### walkingTimeSkim function
Functions:
are replaced by
##### setTransferPenaltySkim function
Function signature has changed from:
to
##### transferPenaltySkim function
Functions:
are replaced by
##### setFareSkim function
Function signature has changed from:
to
##### fareSkim function
Functions:
are replaced by
##### setCrowdDiscomfortSkim function
Function signature has changed from:
to
##### crowdDiscomfortSkim function
Functions
are replaced by
##### addMacroComponent function
Function signature has changed from:
to
##### setMacroComponentSkim function
Function signature has changed from:
to
##### macroComponentSkim function
Function signature has changed from:
to
##### setUserDefinedSkim function
Function signature has changed from:
to
##### userDefinedSkims function
Function signature has changed from:
to
### <a id="skimDataProvider">SkimDataProvider Class</a>
The enum type SkimType has been moved outside of this class into the generic namespace. Now it is defined in the GKLandUseSkimMatricesUtil.
### <a id="macroPTExperimentParams">MacroPTExperimentParams Class</a>
Functions
are replaced by
### <a id="MacroPTAdjustmentScenarioOutputData">MacroPTAdjustmentScenarioOutputData Class</a>
##### userDefinedSkims function
Function signature has changed from:
to
### <a id="ptExperimentOutputData">PTExperimentOutputData Class</a>
##### getSkimMatrices function
Function signature has changed from:
to
##### setSkimMatrices function
Function signature has changed from:
to
### <a id="GKDistributionDataSet">GKDistributionDataSet Class</a>
##### setDistributionArea function
Function signature has changed from:
to
##### setParkingArea function
Function signature has changed from:
to
##### setAttributeValue function
Function signature has changed from:
to
##### getAttributeValue function
Function signature has changed from:
to
##### getDistributionData function
Function signature has changed from:
to
##### setDistributionData function
Function signature has changed from:
to
##### getDistributionArea function
Function signature has changed from:
to
##### getParkingArea function
Function signature has changed from:
to
##### setUseParkingAreaCosts function
Function signature has changed from:
to
##### getUseParkingAreaCosts function
Function signature has changed from:
to
##### setExternalArea function
Function signature has changed from:
to
##### getExternalArea function
Function signature has changed from:
to
##### getModalSplitData function
New function to access the modal split data of a centroid.
Total set of records:
Specific record:
##### setModalSplitData function
New function to set the total set of records of modal split in a centroid:
### <a id="ModalSplitData">ModalSplitData Class</a>
##### getCarAvailabiltiy function
New function to get the car availability:
##### getFactor function
New function to get a transportation mode factor:
##### getPurpose function
New function to get the purpose:
##### getTimePeriod function
New function to get the time period:
##### getType function
New function to get the modal split type ( 0 - Generation, 1 - Attraction ):
##### setCarAvailability function
New function to set the car availability:
##### setFraction function
New function to set factor of a transportation mode:
##### setPurpose function
New function to set the purpose:
##### setTimePeriod function
New function to set the time period:
##### setType function
New function to set the modal split type ( 0 - Generation, 1 - Attraction ):
##### valid function
New function to check modal split data validity ( valid = attributes and percentages are correct ):
##### validAttributes function
New function to check modal split data attributes validity:
##### validPercentages function
New function to check modal split data percentages validity:
### <a id="CentroidDistributionData">CentroidDistributionData Class</a>
##### distributionArea attribute
Attribute int distributionArea has been replaced by the following functions:
##### parkingArea attribute
Attribute int parkingArea has been replaced by the following functions:
##### setDistributionAttribute function
Function signature has changed from:
to
##### getDistributionAttribute function
Function signature has changed from:
to
### <a id="MacroExperimentOutputData">MacroExperimentOutputData Class</a>
##### getSkimMatrices function
Function signature has changed from:
to
##### setSkimMatrices function
Function signature has changed from:
to
### <a id="GKGenerationAttractionScenario">GKGenerationAttractionScenario Class</a>
##### setDataGroup function
Function signature has changed from:
to
##### getDataGroup function
Function signature has changed from:
to
### <a id="GKGenerationAttractionCentroidType">GKGenerationAttractionCentroidType Class</a>
##### setGAFactors function
Function signature has changed from:
to
##### getGAFactors function
Function signature has changed from:
to
### <a id="GKGenerationAttractionData">GKGenerationAttractionData Class</a>
##### m_variable attribute
Attribute int m_variable has been replaced by the following functions:
##### m_timePeriod attribute
Attribute int m_timePeriod has been replaced by the following functions:
##### m_mode attribute
Attribute int m_mode has been replaced by the following functions:
### <a id="GKGenerationAttractionFactor">GKGenerationAttractionFactor Class</a>
##### m_purpose attribute
Attribute int m_purpose has been replaced by the following functions:
### <a id="GKGenerationAttractionDataSet">GKGenerationAttractionDataSet Class</a>
##### getTripGenerationArea function
Function signature has changed from:
to
##### setTripGenerationArea function
Function signature has changed from:
to
##### useExternalData function
Function signature has changed from:
to
##### setExternalData function
Function signature has changed from:
to
##### setUseExternalData function
Function signature has changed from:
to
##### setCarAvailabilityData function
Function signature has changed from:
to
to
##### getCarAvailabilityData function
Function signature has changed from:
to
##### setAttributeData function
Function signature has changed from:
to
##### setCarOwnership function
Function signature has changed from:
to
##### setAverageHousehold function
Function signature has changed from:
to
##### doBalancing function
Function signature has changed from:
to
##### setDoBalancing function
Function signature has changed from:
to
##### getCarOwnership function
Function signature has changed from:
to
##### getAverageHousehold function
Function signature has changed from:
to
##### addAttribute function
Function signature has changed from:
to
##### getAttributes function
Function signature has changed from:
to
##### checkCreateData function
Function signature has changed from:
to
##### getData function
Function signature has changed from:
to
##### getValue function
Function signature has changed from:
to
##### setValue function
Function signature has changed from:
to
##### setExternalData function
Function signature has changed from:
to
##### getExternalData function
Function signature has changed from:
to
### <a id="CentroidGenerationAttractionData">CentroidGenerationAttractionData Class</a>
##### attributes attribute
Access to attributes is now done via the following functions:
##### tripGenerationArea attribute
Access to tripGenerationArea is now done via the following functions:
### <a id="GKDistributionCentroidType">GKDistributionCentroidType Class</a>
##### getDistributionFunction function
Function signature has changed from:
to
##### setDistributionFunction function
Function signature has changed from:
to
##### getModalSplitFunction function
Function signature has changed from:
to
##### setModalSplitFunction function
Function signature has changed from:
to
### <a id="GKControlPlan">GKControlPlan Class</a>
##### addControlMetering function
Function signature has changed from:
to
##### removeControlMetering function
Function signature has changed from:
to
##### removeControlMetering function
Function signature has changed from:
to
##### removeControlMetering function
Function signature has changed from:
to
##### removeControlMetering function
Function signature has changed from:
to
### <a id="GKControlPhase">GKControlPhase Class</a>
##### addSignal function
Function signature has changed from:
to
### <a id="GKControlPhaseSignal">GKControlPhaseSignal Class</a>
##### GKControlPhaseSignal function
Function signature has changed from:
to
#### Public attributes to functions
Public attributes no longer available:
The following functions need to be used instead:
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 );
Yutraffic Classes¶
A generalization of Yutraffic 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 - DistributionScenario - ModalSplitScenario - MacroScenarioOutputData - CMacroTurning - DTATurning - DistributionOutput - MacroAdjustmentScenarioParams - MacroPTStatsManager - MacroPTStatsView - GKFunctionCost - GKPTStation - DTAPTLineSegment - PTSection - GKModel - GKObject - GenerationAttractionOutput - NodeOutputElement - FourStepsUtil - NodeSlot - NodeCompute - NodeConnection - GKControllerParsSitrafficOffice
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 - GKGeometryConfiguration - GKProblemNet - GKSimulationArea - GKTrafficArrivals - AdjustmentMeasurementContext - MacroAdjustmentScenario - MacroAdjustmentExperiment - MacroAdjustmentScenarioUserClassParams - MacroAdjustmentScenarioParams - MacroPTAdjustmentScenario - MacroPTAdjustmentExperiment - DistributionScenario
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
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: - GKFolder - GKPublicLine - GKNode - GKVector - QString - QTime - GKSection 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.
Changes related to scripting classes for simulating¶
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
Changes related to Command classes¶
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();