PyANGKernel.GKExperiment

class GKExperiment

Dynamic experiment that can be either a Micro, a Meso or a Hybrid experiment.

Details

This object holds all needed parameters to run a Dynamic simulation.

A dynamic experiment can be defined either as a SRC (stochastic route choice) or a DUE (dynamic user-equilibrium). If it is defined as a SRC then it has a collection of replications ( GKReplication ) an one or more averages ( GKExperimentResult ). If it is defined as a DUE then it has a collection of experiment results ( GKExperimentResult ). In both cases this experiment belongs to a single scenario ( GKScenario ).

Inheritance diagram of PyANGKernel.GKExperiment

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 GKInitialStateType

The initial state generated either by a wram-up or a save traffic state ( GKDynamicTrafficSnapshot ).

class GKArrivalType

Types of arrivals. Refer to the Aimsun Next Micro manual section for more information on the different types. The eNone special value is returned by getArrivalType when the origin object (centroid or section) has no value.

class GKReactionTimeType

Type of reaction time. - eAsSimStep: reaction time is the same for all the vehicle types. It is equal to the simulation step for micro experiments. - eVariableVehType: reaction time is set for each vehicle type and according to some percentages.

class SimulatorEngine

Network loading type: - eMacroAssignment: BaseForest use only. Last generation information - eMicro: using the microscopic simulator. - eMeso: using the mesoscopic simulator. - eSimplifiedMeso: using the simplified mesoscopic simulator. - eHybrid: using the meso-micro hybrid simulator. - eDynamicMacro: using the macroscopic simulator. No pure MACRO (static). - eMacroMesoHybrid: using the macro-meso hybrid

class EngineMode

Type of the dynamic traffic assignment: - eIterative: dynamic traffic assignment based on user equilibrium (DUE). - eOneShot: dynamic traffic assignment based on stochastic route choice (SRC).

class PathCalculationAlgorithm

Choose Path Calculation Algorithm:

class DisablePathCalculation

Disable Path Calculation type: - eNo: Don’t disable the path calculation. - eForAllODPairs: Disable the path calculation for all ODPairs. - eForTheBlockedODPairsInMatrix: Disable the path calculation for all ODPairs that are blocked in the selected matrix (mBlockedODPairsMatrix).

class HybridMicroFlags

Flag values describing the additional objects (other than those obtained from simulation areas) to be micro-simulated in a hybrid experiment

class TravelTime
class DUEPathCost

DUE: use instantaneous, experienced or time-dependent costs

__init__()
addReplication(replication)
Parameters:

replicationGKReplication

Adds a new replication to this experiment.

addRouteChoiceODParameter(params)
Parameters:

paramsGKExperimentODParameters

Adds an OD route choice parameter.

addSimulationArea(area)
Parameters:

areaGKSimulationArea

Adds a simulation area to this experiment.

appliedMFC()
Return type:

bool

Returns true if the MFC acceleration model is activated

See also

setAppliedMFC()

appliedTWOPAS()
Return type:

bool

Returns true if the TWOPAS acceleration model is activated

blockedODPairsMatrix()
Return type:

GKODMatrix

Returns the blocked ODPairs matrix

clearArrivalsType()

Removes all the arrivals for the origin objects (section or centroid).

clearMaxPathAlternativesPerVehicle()

Removes all the max path alternatives per vehicle.

clearRouteChoiceODParameters()

Removes all OD route choice parameters.

clearSimulationAreas()

Removes all simulation areas from this experiment.

clearVariableReactionTimes()

Discards the variable reaction times data.

disablePathCalculation()
Return type:

DisablePathCalculation

Returns which ODPairs won’t be considered during the path calculation

getActivateExternalBehaviouralModel()
Return type:

bool

getApplyTwoDimensionalModel()
Return type:

bool

getApplyTwoLanesCarFollowingModel()
Return type:

bool

getApplyTwoWayOvertakingModel()
Return type:

bool

getArrivalType()
Return type:

GKArrivalType

Gets the arrival type.

getArrivalType(entry)
Parameters:

entryGKObject

Return type:

GKArrivalType

Returns the arrival type for an origin object (section or centroid). If no arrival has been set then the eNone arrival type will be returned.

getArrivalsType()
Return type:

Dictionary with keys of type .GKObject and values of type GKExperiment.GKArrivalType.

Returns all the arrivals for the origin objects (section or centroid).

getAttractivenessWeight()
Return type:

float

getBinomialModelProbability()
Return type:

float

getCLogitBetaFactor()
Return type:

float

getCLogitGammaFactor()
Return type:

float

getCarFollowingConsiderMinHeadway()
Return type:

bool

getDelayOfAllowedSimultaneousOvertaking()
Return type:

float

getDelayThreshold()
Return type:

float

getEnRouteForODRoutesPercentage(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

float

Gets the number of vehicles that are following an OD-Route and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

getEnRouteForPathAssignmentResultsPercentage(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

float

Gets the number of vehicles that are following a path from the Path Assignment results and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

getEnRouteForRouteChoicePathsPercentage(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

float

Gets the number of vehicles that are following route choice paths (paths calculated using the Route Choice model) and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

getEnRoutePathUpdate()
Return type:

bool

getEnRoutePathUpdateVirtualQueue()
Return type:

bool

getEngineMode()
Return type:

EngineMode

Gets the dynamic traffic assignment’s type.

getFirstAndLastSegmentTravelTimeType()
Return type:

TravelTime

getGlobalFare()
Return type:

float

getHybridMicroFlags()
Return type:

int

Sets the flags value describing the additional objects to be micro-simulated in a hybrid experiment.

getHybridMicroObjects()
Return type:

.QSetGKGeoObject

Returns the set of objects to be micro-simulated in a hybrid experiment, according to the simulation area and flags configured into the experiment.

getInitialStateType()
Return type:

GKInitialStateType

The initial state generated either by a wram-up or a save traffic state ( GKDynamicTrafficSnapshot ).

getIntervalDuration()
Return type:

int

getLinkCostsReplication()
Return type:

GKReplication

getLogitModelScaleFactor()
Return type:

float

getLookAheadDistanceVariability()
Return type:

int

For hybrid micro-meso experiments gets the look-ahead distance variability

getMacroMesoUnitsConversionFactor()
Return type:

float

getMaxPathAlternativesPerVehicle(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

int

Gets the maximum number of path alternatives the route choice will calculate for the specified vehicle. If no data has been set for the vehicle, it returns GKExperiment::getMaxPathAlternativesPerVehicle

getMaximumDistance()
Return type:

float

getMaximumRank()
Return type:

int

getMaximumRoutes()
Return type:

int

getMaximumSpeedDifference()
Return type:

float

getMaximumSpeedDifferenceOnRamp()
Return type:

float

getMaximumSpeedDifferenceThreshold()
Return type:

float

getMesoReactionTimeAtTrafficLight()
Return type:

float

getMinimumSpeedDifferenceThreshold()
Return type:

float

getNameAutomatically()
Return type:

str

Generates the name of this object automatically based on its simulator engine and engine mode.

getNbMicroSimThreads()
Return type:

int

Gets the number of threads used to simulate this Micro replication. Requires an Aimsun Next Advanced License.

getNbReplications()
Return type:

int

Returns the number of replications on this experiment.

getNbResults()
Return type:

int

Returns the number of results on this experiment.

getNbThreadsSim()
Return type:

int

This function is Obsolete, please use: uint getNbMicroSimThreads() .

getNumberOfAllowedSimultaneousOvertaking()
Return type:

int

getNumberOfIntervals()
Return type:

int

getNumberOfVehicles()
Return type:

int

getODRoutesPercentage(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

float

Gets the OD-Routes’s percentage. This is the percentage that will be used to assign paths to vehicle vehicle.

getPathAssignmentResultsPercentage(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

float

Gets the path assignment result’s percentage. This is the percentage that will be used to assign paths to vehicle vehicle.

getPathCalculationAlgorithm()
Return type:

PathCalculationAlgorithm

Gets the assigned Path Calculation Algorithm.

getPathCostsType()
Return type:

DUEPathCost

Gets the type of cost for the paths of the DUE: to use instantaneous, experienced or time-dependent costs

getPrimaryReplication()
Return type:

GKReplication

Returns the primary replication of this experiment. Is the one that will be simulated when executing the experiment. The primary replication is the one with the lower id.

getProportionalModelAlphaFactor()
Return type:

float

getQueueEntrySpeed()
Return type:

float

getQueueExitSpeed()
Return type:

float

getRCUserDefinedFunction()
Return type:

GKFunctionCost

getReactionTime()
Return type:

float

getReactionTimeAtStop()
Return type:

float

getReactionTimeAtTrafficLight()
Return type:

float

getReactionTimeType()
Return type:

GKReactionTimeType

getReenteringSegmentTravelTimeType()
Return type:

TravelTime

getReplications()
Return type:

GKFolder

Returns all the replications of this experiment.

getRouteChoiceODParameters()
Return type:

.list of GKExperimentODParameters

Returns the route choice parameters for an Origin and Destination.

getSensitivityFactorForReducedGap()
Return type:

float

getSimulationAreas()
Return type:

.list of GKSimulationArea

Returns the simulation areas in this experiment.

getSimulationStep()
Return type:

float

getSimulatorEngine()
Return type:

SimulatorEngine

Gets the type of network loading or simulator engine.

getSpeedAcceptanceForOvertaking()
Return type:

float

getSpeedDifferenceThresholdForOvertakingSpeedAcceptance()
Return type:

float

getStoppingCriteria()
Return type:

GKExperimentStoppingCriteria

getTrafficSnapshot()
Return type:

GKDynamicTrafficSnapshot

A traffic snapshot to use as the initial point of a simulation.

getTransferPenaltyFunction()
Return type:

GKFunctionCost

getTravelTimeFunctionComponent()
Return type:

GKFunctionComponent

getTravelTimeThreshold()
Return type:

float

getTwoLanesSpeedDifferenceType()
Return type:

int

getUserDefinedCostWeight()
Return type:

float

getVariableReactionTimesMeso()
Return type:

.QMapconst GKVehicle,list of GKVehicleReactionTimes

Gets all the variable reaction times for the meso model.

getVariableReactionTimesMicro()
Return type:

.QMapconst GKVehicle,list of GKVehicleReactionTimes

Gets all the variable reaction times for the micro model.

getWarmupDemand()
Return type:

GKTrafficDemand

Get traffic demand used during the warm-up simulation.

getWarmupTime()
Return type:

GKTimeDuration

Gets the simulation warm-up period.

getWarmupTimeWithScenario()
Return type:

GKTimeDuration

Gets the simulation warm-up period considering scenario information too.

initialSPTrees()
Return type:

int

intervalsRC()
Return type:

.list of int

isCustomModel()
Return type:

bool

Returns true if the experiment uses customized values for the core model.

isMacro()
Return type:

bool

isMeso()
Return type:

bool

isMicro()
Return type:

bool

isPolicyActive(policy)
Parameters:

policyGKPolicy

Return type:

bool

Returns true if the given policy is active in this experiment or is active in the scenario of this experiment (as traffic condition).

maxAssignmentResultsPaths()
Return type:

int

maxODRoutesPaths()
Return type:

int

relativeGapMatrix()
Return type:

GKODMatrix

removeReplication(replication)
Parameters:

replicationGKReplication

Removes a replication from this experiment. The replication is not deleted.

removeSimulationArea(area)
Parameters:

areaGKSimulationArea

Removes a simulation area from this experiment.

setActivateExternalBehaviouralModel(activate)
Parameters:

activate – bool

setAppliedMFC(aAppliedMFC)
Parameters:

aAppliedMFC – bool

Sets if the MFC acceleration model is activated

See also

appliedMFC()

setAppliedTWOPAS(aAppliedTWOPAS)
Parameters:

aAppliedTWOPAS – bool

Sets if the TWOPAS acceleration model is activated

See also

appliedTWOPAS()

setApplyTwoDimensionalModel(apply)
Parameters:

apply – bool

setApplyTwoLanesCarFollowingModel(apply)
Parameters:

apply – bool

setApplyTwoWayOvertakingModel(apply)
Parameters:

apply – bool

setArrivalType(atype)
Parameters:

atypeGKArrivalType

Sets the arrival type.

setArrivalType(entry, atype)
Parameters:

Sets the arrival type for an origin centroid.

setAttractivenessWeight(value)
Parameters:

value – float

setBinomialModelProbability(value)
Parameters:

value – float

setBlockedODPairsMatrix(matrix)
Parameters:

matrixGKODMatrix

Sets the blocked ODPairs matrix that will be used if “ eForTheBlockedODPairsInMatrix “ is selected

setCLogitBetaFactor(value)
Parameters:

value – float

setCLogitGammaFactor(value)
Parameters:

value – float

setCarFollowingConsiderMinHeadway(value)
Parameters:

value – bool

setCustomModel([set=true])
Parameters:

set – bool

Set it to true if the experiment will use customized values for the core model.

See also

isCustomModel()

setDelayOfAllowedSimultaneousOvertaking(value)
Parameters:

value – float

setDelayThreshold(value)
Parameters:

value – float

setDisablePathCalculation(value)
Parameters:

valueDisablePathCalculation

Set which ODPairs won’t be considered during the path calculation

setEnRouteForODRoutesPercentage(vehicle, percentage)
Parameters:

Sets the number of vehicles that are following an OD-Route and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

setEnRouteForPathAssignmentResultsPercentage(vehicle, percentage)
Parameters:

Sets the number of vehicles that are following a path from the Path Assignment results and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

setEnRouteForRouteChoicePathsPercentage(vehicle, percentage)
Parameters:

Sets the number of vehicles that are following route choice paths (paths calculated using the Route Choice model) and can change its paths during the simulation. This percentage is taken into account only when the experiment is “Dynamic”.

setEnRoutePathUpdate(value)
Parameters:

value – bool

setEnRoutePathUpdateVirtualQueue(value)
Parameters:

value – bool

setEngineMode(em)
Parameters:

emEngineMode

Sets the dynamic traffic assignment’s type.

setFirstAndLastSegmentTravelTimeType(type)
Parameters:

typeTravelTime

setGlobalFare(value)
Parameters:

value – float

setHybridMicroFlags(microFlags)
Parameters:

microFlags – int

Returns the flags value describing the additional objects to be micro-simulated in a hybrid experiment.

setInitialSPTrees(value)
Parameters:

value – int

setInitialStateType(atype)
Parameters:

atypeGKInitialStateType

The initial state generated either by a wram-up or a save traffic state ( GKDynamicTrafficSnapshot ).

setIntervalDuration(value)
Parameters:

value – int

setIntervalsRC(intervals)
Parameters:

intervals – .list of int

setLinkCostsReplication(replication)
Parameters:

replicationGKReplication

setLogitModelScaleFactor(value)
Parameters:

value – float

setLookAheadDistanceVariability(value)
Parameters:

value – int

For hybrid micro-meso experiments sets the look-ahead distance variability

setMacroMesoUnitsConversionFactor(factor)
Parameters:

factor – float

setMaxAssignmentResultsPaths(value)
Parameters:

value – int

setMaxODRoutesPaths(value)
Parameters:

value – int

setMaxPathAlternativesPerVehicle(vehicle, maxPathAlternatives)
Parameters:

Sets the maximum number of path alternatives the route choice will calculate for the specified vehicle.

setMaximumDistance(distance)
Parameters:

distance – float

setMaximumRank(value)
Parameters:

value – int

setMaximumRoutes(value)
Parameters:

value – int

setMaximumSpeedDifference(value)
Parameters:

value – float

setMaximumSpeedDifferenceOnRamp(value)
Parameters:

value – float

setMaximumSpeedDifferenceThreshold(value)
Parameters:

value – float

setMesoReactionTimeAtTrafficLight(value)
Parameters:

value – float

setMinimumSpeedDifferenceThreshold(value)
Parameters:

value – float

setNbMicroSimThreads(aThreads)
Parameters:

aThreads – int

Sets the number of threads used to simulate this Micro replication. Requires an Aimsun Next Advanced License.

setNbThreadsSim(aths)
Parameters:

aths – int

This function is Obsolete, please use: void setNbMicroSimThreads ( uint aThreads ).

setNumberOfAllowedSimultaneousOvertaking(value)
Parameters:

value – int

setNumberOfIntervals(value)
Parameters:

value – int

setNumberOfVehicles(num)
Parameters:

num – int

setODRoutesPercentage(vehicle, percentage)
Parameters:

Sets the OD-Routes’s percentage. This is the percentage that will be used to assign paths to vehicle vehicle.

setPathAssignmentResultsPercentage(vehicle, percentage)
Parameters:

Sets the path assignment result’s percentage. This is the percentage that will be used to assign paths to vehicle vehicle.

setPathCalculationAlgorithm(pca)
Parameters:

pcaPathCalculationAlgorithm

Sets the assigned Path Calculation Algorithm.

setPathCostsType(type)
Parameters:

typeDUEPathCost

Sets the type of cost for the paths of the DUE: to use instantaneous, experienced or time-dependent costs

setProportionalModelAlphaFactor(value)
Parameters:

value – float

setQueueEntrySpeed(value)
Parameters:

value – float

setQueueExitSpeed(value)
Parameters:

value – float

setRCUserDefinedFunction(function)
Parameters:

functionGKFunctionCost

setReactionTime(value)
Parameters:

value – float

setReactionTimeAtStop(value)
Parameters:

value – float

setReactionTimeAtTrafficLight(value)
Parameters:

value – float

setReactionTimeType(type)
Parameters:

typeGKReactionTimeType

setReenteringSegmentTravelTimeType(type)
Parameters:

typeTravelTime

setRelativeGapMatrix(matrix)
Parameters:

matrixGKODMatrix

setRouteChoiceODParameters(params)
Parameters:

params – .list of GKExperimentODParameters

Sets the Origin/Destination route choice models.

setSensitivityFactorForReducedGap(value)
Parameters:

value – float

setSimulationStep(value)
Parameters:

value – float

setSimulatorEngine(se)
Parameters:

seSimulatorEngine

Sets the type of network loading or simulator engine.

setSpeedAcceptanceForOvertaking(value)
Parameters:

value – float

setSpeedDifferenceThresholdForOvertakingSpeedAcceptance(value)
Parameters:

value – float

setStoppingCriteria(criteria)
Parameters:

criteriaGKExperimentStoppingCriteria

setTrafficSnapshot(snap)
Parameters:

snapGKDynamicTrafficSnapshot

A traffic snapshot to use as the initial point of a simulation.

setTransferPenaltyFunction(function)
Parameters:

functionGKFunctionCost

setTravelTimeFunctionComponent(component)
Parameters:

componentGKFunctionComponent

setTravelTimeThreshold(value)
Parameters:

value – float

setTwoLanesSpeedDifferenceType(type)
Parameters:

type – int

setUseDynamicPTAssignment(value)
Parameters:

value – bool

setUseFlatFare(value)
Parameters:

value – bool

setUseProfiledRC(value)
Parameters:

value – bool

setUseTravelTimeFromPathAssignmentPlanInHybridMacroMeso(value)
Parameters:

value – bool

setUserDefinedCostWeight(value)
Parameters:

value – float

setVariableReactionTimesMeso(veh, times)
Parameters:
  • vehGKVehicle

  • times – .list of GKVehicleReactionTimes

Sets the variable reaction times by vehicle type for the meso model.

setVariableReactionTimesMicro(veh, times)
Parameters:
  • vehGKVehicle

  • times – .list of GKVehicleReactionTimes

Sets the variable reaction times by vehicle type for the micro model.

setWarmupDemand(ademand)
Parameters:

ademandGKTrafficDemand

Set traffic demand used during the warm-up simulation.

setWarmupTime(aTime)
Parameters:

aTimeGKTimeDuration

Sets the simulation warm-up period.

useDynamicPTAssignment()
Return type:

bool

useFlatFare()
Return type:

bool

useProfiledRC()
Return type:

bool

useTravelTimeFromPathAssignmentPlanInHybridMacroMeso()
Return type:

bool

usesMaxPathAlternativesPerVehicle()
Return type:

bool

Returns true if there are max path alternatives by vehicle (if not use GKExperiment::maxRoutesAtt that is what getMaxPathAlternativesPerVehicle uses when asked by an undefined vehicle).

usesSimulationArea(area)
Parameters:

areaGKSimulationArea

Return type:

bool

Returns true is the simulation area is used in the experiment.