PyANGKernel.GKScenarioInputData

class GKScenarioInputData

Scenario input data

Details

This class holds all the scenario input data (traffic demand, control plans, transit plans, statistics, …)

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

class ODStatType
class TrajectoryType

Trajectory conditions Type

__init__()
activateExtension(name)
Parameters:

name – str

If ‘name’ is found in the Enhanced Aimsun Next Extensions, it activates it. Else, nothing happens.

activateExtensionAt(index)
Parameters:

index – int

It activates the Enhanced Aimsun Next Extension at ‘index’. [ Store internal extensions always active ] PRE: 0 <= index < numberOfAimsunExtensions

addExtension(extPath, enabled)
Parameters:
  • extPath – str

  • enabled – bool

Add an Aimsun Next API to the scenario list of APIs. The extPath is the full path to the Aimsun Next API. The enabled indicates whether it is active or not.

addPTTrajectory(idLine, percentage, keepStopTimes)
Parameters:
  • idLine – int

  • percentage – float

  • keepStopTimes – bool

Adds a trajectory to the list of trajectories from where statistics will be collected

addPairForPathStat(origin, destination)
Parameters:
  • origin – int

  • destination – int

addPairListStatistics(aPair)
Parameters:

aPairGKPairStat

Adds a centroid pair to the list of centroids from where statistics will be collected

addSubPath(subpath)
Parameters:

subpathGKSubPath

Adds a subpath to the list of subpaths from where statistics will be collected

addTrajectoryListStatistics(aTrajectoriesType, value)
Parameters:

Adds a trajectory to the list of trajectories from where statistics will be collected

clearPTTrajectories()

Removes all trajectories from the list of trajectories from where statistics will be collected

clearPairListStatistics()

Removes all centroid pairs from the list of centroid pairs from where statistics will be collected

clearPairsForPathStat()
clearSubPaths()

Removes all subpaths from the list of subpaths from where statistics will be collected

clearTrajectoryListStatistics(aTrajectoriesType)
Parameters:

aTrajectoriesTypeTrajectoryType

Removes all trajectories from the list of trajectories from where statistics will be collected (API purpose)

containsAimsunExtension(name)
Parameters:

name – str

Return type:

bool

Returns if the Enhanced Aimsun Next Extensions with ‘name’ is included in this scenario (Active or not).

deactivateExtension(name)
Parameters:

name – str

If ‘name’ is found in the Enhanced Aimsun Next Extensions, it deactivates it. Else, nothing happens.

deactivateExtensionAt(index)
Parameters:

index – int

It deactivates the Enhanced Aimsun Next Extension at ‘index’. PRE: 0 <= index < numberOfAimsunExtensions

enableExtension(extPath, value)
Parameters:
  • extPath – str

  • value – bool

Activates or deactivates (depending on ‘value’) the API whose full path is specified in extPath.

enableStoreDetection(value)
Parameters:

value – bool

Sets whether the detection data will be stored in the database or not

enableStoreStatistics(value)
Parameters:

value – bool

Sets whether the statistics will be stored in the database or not

generateRelativeGapMatrices()
Return type:

bool

Returns true if the relative gap matrices are generated and false otherwise.

getActivateDetection()
Return type:

bool

Returns whether the detection data is activated in the scenario or not.

getActivateLinkCosts()
Return type:

bool

returns whether the storing of the link costs is activated or not.

getActivateQueueJump()
Return type:

int

Gets Queue Jump Gridlock Revision Interval (seconds)

getActivateStatistics()
Return type:

bool

Returns whether the Statistics calculation are activated in the scenario or not. They are activated only if time series are being generated * or if data is stored in the database.

getAimsunExtensionAt(index)
Parameters:

index – int

Return type:

str

Returns the name of the Enhanced Aimsun Next Extensions at ‘index’ in this scenario (Active or not). PRE: 0 <= index < numberOfAimsunExtensions

getAnimationFile()
Return type:

str

Gets the file where the XML animation for micro experiments will be stored into.

getAnimationPolygon()
Return type:

GKPolygon

Gets the file where the XML animation for micro experiments will be stored into.

getAnimationRotation()
Return type:

float

Gets the XML animation rotation (in degrees)

getAnimationXRotationCenter()
Return type:

float

Gets the X coordinate of the XML animation rotation center

getAnimationXTranslation()
Return type:

float

Gets the X coordinate of the XML animation translation

getAnimationYRotationCenter()
Return type:

float

Gets the Y coordinate of the XML animation rotation center

getAnimationYTranslation()
Return type:

float

Gets the Y coordinate of the XML animation translation

getControlMeteringStatistics()
Return type:

bool

Returns whether control statistics for ramp meters are being saved or not.

getControlPhaseEventStatistics()
Return type:

bool

Returns whether control statistics for phase events are being saved or not. Useful mainly for actuated control plans.

getControlPhaseStatistics()
Return type:

bool

Returns whether control statistics for phases are being saved or not.

getControlPlanStatistics()
Return type:

bool

returns if control plan statistics are gathered

getControlSignalStatistics()
Return type:

bool

Returns whether control statistics for signal groups are being saved or not.

getControlTurnStatistics()
Return type:

bool

Returns whether control statistics for turns are being saved or not.

getCycleDetection()
Return type:

float

The detection cycle in seconds

getDebugControllers()
Return type:

bool

Gets whether to create debug files for controllers or not.

getDestinationStatistics()
Return type:

ODStatType

getDetailedPedTrajectoriesStatistics()
Return type:

bool

getDetailedTrajectoriesStatistics()
Return type:

bool

getDetectionInterval()
Return type:

GKTimeDuration

Returns the detection interval defined

getEnergyConsumption()
Return type:

bool

Returns whether statistics about fuel consumption will be calculated or not

getExtensions()
Return type:

.list of QPairGKFilePath,QString

getGenerateDynamicTransitSkims()
Return type:

bool

getGenerateDynamicTransitStats()
Return type:

bool

getGenerateSCATSSignalGroupFiles()
Return type:

bool

Gets whether to create log files for SCATS controllers or not.

getGlobalPedTrajectoriesStatistics()
Return type:

bool

getGlobalTrajectoriesStatistics()
Return type:

bool

getGridlockRevisionInterval()
Return type:

int

Gets Queue Jump Gridlock Revision Interval (seconds)

getGroupStatistics()
Return type:

bool

Returns whether grouping statistics are gathered or not

getHCMApproachMaxDistance()
Return type:

float

getHcmStatistics()
Return type:

bool

getIndividualPTStats()
Return type:

bool

getInputPathAssignmentPlan()
Return type:

GKPathAssignmentPlan

Returns the path assignment plan object used as input

getInstantEmission()
Return type:

bool

Returns whether Instant Emission pollutants (Panis et al) will be calculated or not

getKeepHistoryDet()
Return type:

bool

Returns whether the detection data is defined to be kept in memory or not

getKeepHistoryStat()
Return type:

bool

Returns whether the statistics are defined to be kept in memory on not

getKeepLinkCostsInMemory()
Return type:

bool

returns the keep in memory flag of the link costs

getKeepPathsInMemory()
Return type:

bool

Returns whether path assignment is being kept in memory or not.

getLemStatistics()
Return type:

bool

Returns whether Tate Emission pollutants model will be calculated or not. * Keep in mind that is mandatory “activate” sections check box (use the setSectionsStatistics function)

getLinkStatsGroup()
Return type:

GKGroup

Only the Costs and Travel Times for the Links included in the group will be saved to the database. * All Links will be saved if no group is specified

getMatrixStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the OD matrices statistics calculation is activated or not.

getMaxGridlockWaitTime()
Return type:

int

Gets Queue Jump Maximum Gridlock Waiting Time (seconds)

getNLastIterationsToSave()
Return type:

int

Only the Costs and Travel Times for the last N iterations will be saved to the database. * All iterations will be saved if set to 0

getNbDetectionIntervals()
Return type:

int

Helper function: how many intervals for detection? It takes into account the simulation length and the detection interval.

getNbStatisticsIntervals()
Return type:

int

Helper function: how many intervals for statistics? It takes into account the simulation length and the stat interval.

getNumberOfAimsunExtensions()
Return type:

int

Returns the number of Enhanced Aimsun Next Extensions for this scenario (Active or not).

getOriginStatistics()
Return type:

ODStatType

getPTStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the transit statistics calculation is activated or not.

getPTStopStatistics()
Return type:

bool

Returns whether pedestrian transit stop statistics are gathered or not

getPTTrajectories()
Return type:

Dictionary with keys of type .int and values of type GKPublicTransportStat.

Returns the list of trajectory from where statistics will be collected

getPairListStatistics()
Return type:

.list of GKPairStat

Returns the list of centroid pairs from where statistics will be collected

getPairsForPathStat()
Return type:

.list of std.pairuint,uint

getPairsStatistics()
Return type:

ODStatType

getParametersFromExtension(name)
Parameters:

name – str

Return type:

str

If ‘name’ is found in the Enhanced Aimsun Next Extensions, returns the parameters. Else, returns the name unchanged.

getParametersFromExtensionAt(index)
Parameters:

index – int

Return type:

str

Returns the parameters in the Enhanced Aimsun Next Extensions at ‘index’. PRE: 0 <= index < numberOfAimsunExtensions

getPedestrianCrossingStatistics()
Return type:

bool

Returns whether pedestrian crossing statistics are gathered or not

getPollutionEmission()
Return type:

bool

Returns whether statistics for pollutants (QUARTET) will be calculated or not

getPrefixForSCATSRampMeteringGroupFiles()
Return type:

str

Gets the prefix (that is, complete path + file prefix) to use when creating the ramp meter’s log files for SCATS Controllers. The ID of the controller and the txt extension will be automatically added to the prefix when creating the file * to write the info in.

getPrefixForSCATSSignalGroupFiles()
Return type:

str

Gets the prefix (that is, complete path + file prefix) to use when creating the signal group’s log files for SCATS Controllers. The ID of the controller and the txt extension will be automatically added to the prefix when creating the file * to write the info in.

getRecordSimulation()
Return type:

bool

Obsolete function. Attribute moved to the replication. Just keeping it to be able to read old networks and move the value to the replication in the postrestore.

getRelativeGapStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the relative gap statistics calculation is activated or not.

getSaveAnimation()
Return type:

bool

Gets whether to store an XML animation or not for micro experiments.

getSaveLinkCosts()
Return type:

bool

getSaveTrafficArrivals()
Return type:

bool

Obsolete function. Attribute moved to the replication. Just keeping it to be able to read old networks and move the value to the replication in the postrestore.

getScenario()
Return type:

GKScenario

Returns the scenario releated to this scenario input data

getSectionLanesStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the section lane statistics calculation is activated or not.

getSectionTrajectoriesStatistics()
Return type:

bool

getSectionsStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the section statistics calculation is activated or not.

getServicePointStatistics()
Return type:

bool

Returns whether pedestrian service point statistics are gathered or not

getStatisticalInterval()
Return type:

GKTimeDuration

Returns the statistics interval defined

getStoreAllPairsPathStat()
Return type:

bool

getSubPaths()
Return type:

.list of GKSubPath

Returns the list of subpaths from where statistics will be collected

getSubPathsStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the stream statistics calculation is activated or not.

getSubpathsTrajectoryStatistics()
Return type:

bool

returns if the individual vehicle statistics in subpaths have been activated

getTrafficArrivals()
Return type:

GKTrafficArrivals

Obsolete function. Attribute moved to the replication. Just keeping it to be able to read old networks and move the value to the replication in the postrestore.

getTrafficManagementStatistics()
Return type:

bool

returns if traffic management statistics are gathered

getTrajectoriesStatistics()
Return type:

bool

Returns whether statistics about trajectories will be stored in the database or not

getTrajectoryListByCentroid(aTrajectoriesType, aCentroidId)
Parameters:
Return type:

.std.vectorGKTrajectoryCondition

Removes a trajectorypair from the list of trajectories from where statistics will be collected by centroid

getTrajectoryListByVehicleType(aTrajectoriesType, aMobileAgentId)
Parameters:
Return type:

.std.vectorGKTrajectoryCondition

Removes a trajectorypair from the list of trajectories from where statistics will be collected by mobile agent

getTrajectoryListStatistics(aTrajectoriesType)
Parameters:

aTrajectoriesTypeTrajectoryType

Return type:

.std.vectorGKTrajectoryCondition

Returns the list of trajectory from where statistics will be collected by trajectories type (veh or ped)

getTurnsStatistics()
Return type:

bool

Once the Statistics have been activated, this function returns whether the nodes and turns statistics calculation is activated or not.

hasExtensions()
Return type:

bool

isAimsunExtensionActive(name)
Parameters:

name – str

Return type:

bool

If ‘name’ is found in the Enhanced Aimsun Next Extensions and is active, returns true. Else, returns false.

isAimsunExtensionActiveAt(index)
Parameters:

index – int

Return type:

bool

Returns true if the Enhanced Aimsun Next Extension at ‘index’ is active. Else, returns false. PRE: 0 <= index < numberOfAimsunExtensions

isCycleDetectionAsSimulationStep()
Return type:

bool

Use the simulation step as the detection cycle? The default is yes.

isEAIExtensionActive()
Return type:

bool

Check if External Agents Interface is active

isPairInStatistics(aPair)
Parameters:

aPairGKPairStat

Return type:

bool

Returns true if the centroid pair is in the list of centroid pairs from where statistics will be collected

isSubPathInStatistics(subpath)
Parameters:

subpathGKSubPath

Return type:

bool

Returns true if the subpath is in the list of subpaths from where statistics will be collected.

provideTravelTime()
Return type:

bool

Not active anymore - obsolete

removeDeprecatedExtension(nameExt)
Parameters:

nameExt – str

removeExtension(extPath)
Parameters:

extPath – str

Removes an Aimsun Next API from the scenario list of APIs. The extPath is the full path to the Aimsun Next API.

removeExtensions()

Removes all the Aimsun APIs in this scenario from the list.

removePairForPathStat(origin, destination)
Parameters:
  • origin – int

  • destination – int

removePairListStatistics(aPair)
Parameters:

aPairGKPairStat

Removes a centroid pair from the list of centroid pairs from where statistics will be collected

removeSubPath(subpath)
Parameters:

subpathGKSubPath

Removes the specified subpath from the input data.

removeTrajectoryListStatistics(aTrajectoriesType, value)
Parameters:

Removes a trajectorypair from the list of trajectories from where statistics will be collected (API purpose)

saveLinkCostAndFlowStats()
Return type:

bool

Returns true if Link Costs and Travel Times need to be saved to the database. ( DUELINKDATA )

saveRelativeGapStats()
Return type:

bool

Returns true if the relative gap statistics need to be saved to the database ( DUERGAP + DUEITERDATA ).

setActivateQueueJump(activate)
Parameters:

activate – bool

Sets Queue Jump active

setAnimationFile(afileName)
Parameters:

afileName – str

Sets the file where the XML animation for micro experiments will be stored into.

setAnimationPolygon(pol)
Parameters:

polGKPolygon

Sets the XML animation polygon to limit the animation output to objects inside the polygon.

setAnimationRotation(value)
Parameters:

value – float

Sets the XML animation rotation (in degrees)

setAnimationXRotationCenter(value)
Parameters:

value – float

Sets the X coordinate of the XML animation rotation center

setAnimationXTranslation(value)
Parameters:

value – float

Sets the X coordinate of the XML animation translation

setAnimationYRotationCenter(value)
Parameters:

value – float

Sets the Y coordinate of the XML animation rotation center

setAnimationYTranslation(value)
Parameters:

value – float

Sets the Y coordinate of the XML animation translation

setControlMeteringStatistics(save)
Parameters:

save – bool

Sets whether control statistics for ramp meters are being saved or not.

setControlPhaseEventStatistics(save)
Parameters:

save – bool

Sets whether control statistics for phase events are being saved or not. Useful mainly for actuated control plans.

setControlPhaseStatistics(save)
Parameters:

save – bool

Sets whether control statistics for phases are being saved or not.

setControlPlanStatistics(value)
Parameters:

value – bool

sets whether control plan statistics are gathered or not

setControlSignalStatistics(save)
Parameters:

save – bool

Sets whether control statistics for signal groups are being saved or not.

setControlTurnStatistics(save)
Parameters:

save – bool

Sets whether control statistics for turns are being saved or not.

setCycleDetection(value)
Parameters:

value – float

The detection cycle in seconds

setCycleDetectionAsSimulationStep(value)
Parameters:

value – bool

Use the simulation step as the detection cycle? The default is yes.

setDebugControllers(save)
Parameters:

save – bool

Sets whether to create debug files for controllers or not.

setDestinationStatistics(value)
Parameters:

valueODStatType

setDetailedPedTrajectoriesStatistics(aDetailedPedTrajectories)
Parameters:

aDetailedPedTrajectories – bool

setDetailedTrajectoriesStatistics(save)
Parameters:

save – bool

setDetectionInterval(atime)
Parameters:

atimeGKTimeDuration

Sets the time interval to be used for gathering detection data.

setEnergyConsumption(value)
Parameters:

value – bool

Sets whether statistics about fuel consumption will be calculated or not

setGenerateDynamicTransitSkims(value)
Parameters:

value – bool

setGenerateDynamicTransitStats(value)
Parameters:

value – bool

setGenerateRelativeGapMatrices(value)
Parameters:

value – bool

Sets whether the relative gap matrices will be generated.

setGenerateSCATSSignalGroupFiles(save)
Parameters:

save – bool

Sets whether to create log files for SCATS controllers or not.

setGlobalPedTrajectoriesStatistics(aGlobalPedTrajectories)
Parameters:

aGlobalPedTrajectories – bool

setGlobalTrajectoriesStatistics(save)
Parameters:

save – bool

Once the Trajectories have been activated, this function sets whether the gloabl trajectory data is going to be gathered or not.

setGridlockRevisionInterval(seconds)
Parameters:

seconds – int

Sets Queue Jump Gridlock Revision Interval (seconds)

setGroupStatistics(value)
Parameters:

value – bool

Sets whether grouping statistics are gathered or not

setHCMApproachMaxDistance(aDistance)
Parameters:

aDistance – float

setHcmStatistics(value)
Parameters:

value – bool

setIndividualPTStats(value)
Parameters:

value – bool

setInputPathAssignmentPlan(arg__1)
Parameters:

arg__1GKPathAssignmentPlan

Sets the path assignment plan object used as input

setInstantEmission(value)
Parameters:

value – bool

Sets whether Instant Emission pollutants (Panis et al) will be calculated or not

setKeepHistoryDet(value)
Parameters:

value – bool

Sets whether the detection data will be kept in memory or not

setKeepHistoryStat(value)
Parameters:

value – bool

Sets whether the statistics will be kept in memory or not

setKeepLinkCostsInMemory(keep)
Parameters:

keep – bool

sets the keep in memory flag of the link costs

setKeepPathsInMemory(keep)
Parameters:

keep – bool

Sets whether path assignment is going to be kept in memory or not.

setLemStatistics(value)
Parameters:

value – bool

Sets whether Tate Emission pollutants model will be calculated or not. * Keep in mind that is mandatory “activate” sections check box (use the setSectionsStatistics function)

setLinkStatsGroup(group)
Parameters:

groupGKGroup

Sets which Links Costs and Travel times need to be saved to the database.

setMatrixStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function returns whether the OD matrices statistics calculation is activated or not.

setMaxGridlockWaitTime(seconds)
Parameters:

seconds – int

Sets Queue Jump Maximum Gridlock Waiting Time (seconds)

setNLastIterationsToSave(num)
Parameters:

num – int

Sets the number of iterations ( starting by last one ) that need to be saved to the database.

setOriginStatistics(value)
Parameters:

valueODStatType

setPTStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function sets whether the transit statistics calculation will be activated or not.

setPTStopStatistics(value)
Parameters:

value – bool

Sets whether pedestrian transit stop statistics are gathered or not

setPairsStatistics(value)
Parameters:

valueODStatType

setParametersForExtension(name, params)
Parameters:
  • name – str

  • params – str

If ‘name’ is found in the Enhanced Aimsun Next Extensions, is modifies its parameters with ‘params’. Else, it creates the extension with (name, params, false).

setParametersForExtensionAt(index, params)
Parameters:
  • index – int

  • params – str

It modifies the parameters in the Enhanced Aimsun Next Extensions at ‘index’. PRE: 0 <= index < numberOfAimsunExtensions

setPedestrianCrossingStatistics(value)
Parameters:

value – bool

Sets whether pedestrian crossing statistics are gathered or not

setPollutionEmission(value)
Parameters:

value – bool

Sets whether statistics for pollutants (QUARTET) will be calculated or not

setPrefixForSCATSRampMeteringGroupFiles(prefix)
Parameters:

prefix – str

Sets the prefix (that is, complete path + file prefix) to use when creating the ramp meter’s log files for SCATS Controllers. The ID of the controller and the txt extension will be automatically added to the prefix when creating the file * to write the info in.

setPrefixForSCATSSignalGroupFiles(prefix)
Parameters:

prefix – str

Sets the prefix (that is, complete path + file prefix) to use when creating the signal group’s log files for SCATS Controllers. The ID of the controller and the txt extension will be automatically added to the prefix when creating the file * to write the info in.

setProvideTravelTime(value)
Parameters:

value – bool

Not active anymore - obsolete

setRelativeGapStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function sets whether the relative gap statistics calculation will be activated or not.

setSaveAnimation(value)
Parameters:

value – bool

Sets whether to store an XML animation or not for micro experiments.

setSaveLinkCostAndFlowStats(value)
Parameters:

value – bool

Sets whether Link Cost and Travel Times statistics need to be saved to the database.

setSaveLinkCosts(value)
Parameters:

value – bool

setSaveRelativeGapStats(value)
Parameters:

value – bool

Sets whether the relative gap statistics need to be saved to the database.

setSectionLanesStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function returns whether the section lanes statistics calculation is activated or not.

setSectionTrajectoriesStatistics(save)
Parameters:

save – bool

setSectionsStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function returns whether the section statistics calculation is activated or not.

setServicePointStatistics(value)
Parameters:

value – bool

Sets whether pedestrian service point statistics are gathered or not

setStatisticalInterval(atime)
Parameters:

atimeGKTimeDuration

Sets the time interval to be used for gathering statistics.

setStoreAllPairsPathStat(value)
Parameters:

value – bool

setSubPathsStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function sets whether the stream statistics calculation is activated or not.

setSubpathsTrajectoryStatistics(value)
Parameters:

value – bool

activates the individual vehicle statistics in subpaths

setTrafficManagementStatistics(value)
Parameters:

value – bool

sets whether traffic management statistics are gathered or not

setTrajectoriesStatistics(value)
Parameters:

value – bool

Sets whether to store statistics about trajectories in the database or not

setTrajectoryConditionsStats(aTrajectoriesType, aTrajectories)
Parameters:
  • aTrajectoriesTypeTrajectoryType

  • aTrajectories – .std.vectorGKTrajectoryCondition

Set trajectory conditions for statistics

setTurnsStatistics(value)
Parameters:

value – bool

Once the Statistics have been activated, this function sets whether the nodes and turns statistics calculation will be activated or not.

storeDetectionEnabled()
Return type:

bool

Returns whether the detection data is defined to be stored in the database or not

storeEnabled()
Return type:

bool

Returns true if simulation data will be store in the database ( getActivateStatistics , getActivateDetection , getActivatePathStat, storeStatisticsEnabled , storeDetectionEnabled , storePathStatEnabled)

storeStatisticsEnabled()
Return type:

bool

Returns whether the statistics are defined to be stored in the database or not