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¶
def
__init__()def
addExtension()def
addSubPath()def
clearSubPaths()def
getExtensions()def
getScenario()def
getSubPaths()def
hasExtensions()def
removeSubPath()def
storeEnabled()
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:
aPair –
GKPairStat
Adds a centroid pair to the list of centroids from where statistics will be collected
Adds a subpath to the list of subpaths from where statistics will be collected
- addTrajectoryListStatistics(aTrajectoriesType, value)¶
- Parameters:
aTrajectoriesType –
TrajectoryTypevalue –
GKTrajectoryCondition
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:
aTrajectoriesType –
TrajectoryType
Removes all trajectories from the list of trajectories from where statistics will be collected (API purpose)
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
Returns true if the relative gap matrices are generated and false otherwise.
See also
Returns whether the detection data is activated in the scenario or not.
returns whether the storing of the link costs is activated or not.
Gets Queue Jump Gridlock Revision Interval (seconds)
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.
Returns the name of the Enhanced Aimsun Next Extensions at ‘index’ in this scenario (Active or not). PRE: 0 <= index < numberOfAimsunExtensions
Gets the file where the XML animation for micro experiments will be stored into.
Gets the file where the XML animation for micro experiments will be stored into.
Gets the XML animation rotation (in degrees)
Gets the X coordinate of the XML animation rotation center
Gets the X coordinate of the XML animation translation
Gets the Y coordinate of the XML animation rotation center
Gets the Y coordinate of the XML animation translation
Returns whether control statistics for ramp meters are being saved or not.
Returns whether control statistics for phase events are being saved or not. Useful mainly for actuated control plans.
Returns whether control statistics for phases are being saved or not.
returns if control plan statistics are gathered
Returns whether control statistics for signal groups are being saved or not.
Returns whether control statistics for turns are being saved or not.
The detection cycle in seconds
Gets whether to create debug files for controllers or not.
- getDestinationStatistics()¶
- Return type:
- getDetectionInterval()¶
- Return type:
Returns the detection interval defined
Returns whether statistics about fuel consumption will be calculated or not
- getExtensions()¶
- Return type:
.list of QPairGKFilePath,QString
Gets whether to create log files for SCATS controllers or not.
Gets Queue Jump Gridlock Revision Interval (seconds)
Returns whether grouping statistics are gathered or not
- getInputPathAssignmentPlan()¶
- Return type:
Returns the path assignment plan object used as input
Returns whether Instant Emission pollutants (Panis et al) will be calculated or not
Returns whether the detection data is defined to be kept in memory or not
Returns whether the statistics are defined to be kept in memory on not
returns the keep in memory flag of the link costs
Returns whether path assignment is being kept in memory or not.
Returns whether Tate Emission pollutants model will be calculated or not. * Keep in mind that is mandatory “activate” sections check box (use the
setSectionsStatisticsfunction)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
Once the Statistics have been activated, this function returns whether the OD matrices statistics calculation is activated or not.
Gets Queue Jump Maximum Gridlock Waiting Time (seconds)
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
Helper function: how many intervals for detection? It takes into account the simulation length and the detection interval.
Helper function: how many intervals for statistics? It takes into account the simulation length and the stat interval.
Returns the number of Enhanced Aimsun Next Extensions for this scenario (Active or not).
- getOriginStatistics()¶
- Return type:
Once the Statistics have been activated, this function returns whether the transit statistics calculation is activated or not.
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:
If ‘name’ is found in the Enhanced Aimsun Next Extensions, returns the parameters. Else, returns the name unchanged.
Returns the parameters in the Enhanced Aimsun Next Extensions at ‘index’. PRE: 0 <= index < numberOfAimsunExtensions
Returns whether pedestrian crossing statistics are gathered or not
Returns whether statistics for pollutants (QUARTET) will be calculated or not
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.
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.
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.
Once the Statistics have been activated, this function returns whether the relative gap statistics calculation is activated or not.
Gets whether to store an XML animation or not for micro experiments.
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:
Returns the scenario releated to this scenario input data
Once the Statistics have been activated, this function returns whether the section lane statistics calculation is activated or not.
Once the Statistics have been activated, this function returns whether the section statistics calculation is activated or not.
Returns whether pedestrian service point statistics are gathered or not
- getStatisticalInterval()¶
- Return type:
Returns the statistics interval defined
Returns the list of subpaths from where statistics will be collected
Once the Statistics have been activated, this function returns whether the stream statistics calculation is activated or not.
returns if the individual vehicle statistics in subpaths have been activated
- getTrafficArrivals()¶
- Return type:
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.
returns if traffic management statistics are gathered
Returns whether statistics about trajectories will be stored in the database or not
- getTrajectoryListByCentroid(aTrajectoriesType, aCentroidId)¶
- Parameters:
aTrajectoriesType –
TrajectoryTypeaCentroidId – int
- Return type:
.std.vectorGKTrajectoryCondition
Removes a trajectorypair from the list of trajectories from where statistics will be collected by centroid
- getTrajectoryListByVehicleType(aTrajectoriesType, aMobileAgentId)¶
- Parameters:
aTrajectoriesType –
TrajectoryTypeaMobileAgentId – int
- Return type:
.std.vectorGKTrajectoryCondition
Removes a trajectorypair from the list of trajectories from where statistics will be collected by mobile agent
- getTrajectoryListStatistics(aTrajectoriesType)¶
- Parameters:
aTrajectoriesType –
TrajectoryType- Return type:
.std.vectorGKTrajectoryCondition
Returns the list of trajectory from where statistics will be collected by trajectories type (veh or ped)
Once the Statistics have been activated, this function returns whether the nodes and turns statistics calculation is activated or not.
If ‘name’ is found in the Enhanced Aimsun Next Extensions and is active, returns true. Else, returns false.
Returns true if the Enhanced Aimsun Next Extension at ‘index’ is active. Else, returns false. PRE: 0 <= index < numberOfAimsunExtensions
Use the simulation step as the detection cycle? The default is yes.
Check if External Agents Interface is active
- isPairInStatistics(aPair)¶
- Parameters:
aPair –
GKPairStat- Return type:
Returns true if the centroid pair is in the list of centroid pairs from where statistics will be collected
Returns true if the subpath is in the list of subpaths from where statistics will be collected.
Not active anymore - obsolete
See also
- 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:
aPair –
GKPairStat
Removes a centroid pair from the list of centroid pairs from where statistics will be collected
Removes the specified subpath from the input data.
- removeTrajectoryListStatistics(aTrajectoriesType, value)¶
- Parameters:
aTrajectoriesType –
TrajectoryTypevalue –
GKTrajectoryCondition
Removes a trajectorypair from the list of trajectories from where statistics will be collected (API purpose)
Returns true if Link Costs and Travel Times need to be saved to the database. ( DUELINKDATA )
See also
Returns true if the relative gap statistics need to be saved to the database ( DUERGAP + DUEITERDATA ).
See also
- 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.
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.
See also
- setDebugControllers(save)¶
- Parameters:
save – bool
Sets whether to create debug files for controllers or not.
- setDestinationStatistics(value)¶
- Parameters:
value –
ODStatType
- setDetailedPedTrajectoriesStatistics(aDetailedPedTrajectories)¶
- Parameters:
aDetailedPedTrajectories – bool
- setDetailedTrajectoriesStatistics(save)¶
- Parameters:
save – bool
- setDetectionInterval(atime)¶
- Parameters:
atime –
GKTimeDuration
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.
See also
- 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__1 –
GKPathAssignmentPlan
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
setSectionsStatisticsfunction)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:
value –
ODStatType
- 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:
value –
ODStatType
- 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
See also
- 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.
See also
- setSaveLinkCosts(value)¶
- Parameters:
value – bool
- setSaveRelativeGapStats(value)¶
- Parameters:
value – bool
Sets whether the relative gap statistics need to be saved to the database.
See also
- 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:
atime –
GKTimeDuration
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:
aTrajectoriesType –
TrajectoryTypeaTrajectories – .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.
Returns whether the detection data is defined to be stored in the database or not
Returns true if simulation data will be store in the database (
getActivateStatistics,getActivateDetection, getActivatePathStat,storeStatisticsEnabled,storeDetectionEnabled, storePathStatEnabled)Returns whether the statistics are defined to be stored in the database or not