PyANGKernel.GKModelConnection

class GKModelConnection

Base class for model-to-simulation connections

Details

This class is intended to be used as a base class for the different model-to-simulator classes that exist in Aimsun, like i.e.: - GAimsunConnection (Micro) - AMesoNGConnection (Meso)

The class itself stores common data for all (such as replication, experiment & model) and provides the required functions for attribute overrides, etc…

Synopsis

Methods

Static functions

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

__init__()
canUseVehicleInSection(section, agent)
Parameters:
Return type:

bool

static experimentChanged(experiment)
Parameters:

experimentGKGenericExperiment

Call this to notify all the GKModelConnection instances that the specified experiment has changed.

getExperiment()
Return type:

GKGenericExperiment

getModel()
Return type:

GKModel

getObjectDataValue(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

object

getObjectDataValue(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

object

getObjectDataValue(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

object

getObjectDataValueBool(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

bool

getObjectDataValueBool(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

bool

getObjectDataValueBool(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

bool

getObjectDataValueDouble(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

float

getObjectDataValueDouble(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

float

getObjectDataValueDouble(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

float

getObjectDataValueInt(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

int

getObjectDataValueInt(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

int

getObjectDataValueInt(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

int

getObjectDataValueObject(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

GKObject

getObjectDataValueObject(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

GKObject

getObjectDataValueObject(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

GKObject

getObjectDataValueString(obj, column[, context=GKContext.anyContext])
Parameters:
Return type:

str

getObjectDataValueString(obj, columnName[, context=GKContext.anyContext])
Parameters:
Return type:

str

getObjectDataValueString(obj, columnId[, context=GKContext.anyContext])
Parameters:
Return type:

str

getOverride(obj, column)
Parameters:
Return type:

GKNetworkAttributesOverride

getOverridenColumns(obj)
Parameters:

objGKObject

Return type:

.list of const GKColumn

getSectionLane(section, lanePos)
Parameters:
Return type:

GKSectionLane

Returns the section lane object corresponding to the given lane position, with its attributes appropriately overriden by the experiment.

getSectionLanes(section)
Parameters:

sectionGKSection

Return type:

.list of GKSectionLane

Returns the full array of section lanes belonging to the given section, with their attributes appropriately overriden by the experiment.

getTurningAttractivenessByVehicleType(turning, vehicleType[, usesCapacityAsAttractivenessPtr=None])
Parameters:
  • turningGKTurning

  • vehicleTypeGKVehicle

  • usesCapacityAsAttractivenessPtr – bool

Return type:

float

getTurningCapacity(turning[, isAutoPtr=None])
Parameters:
Return type:

float

Helper function which calculates the capacity to use for a given turn by using the following method: * - IF the user overrides the automatic capacity (bool) for the turning, it calculates or uses the manual capacity accordingly. * - IF the user overrides the manual capacity, make sure the automatic capacity is set to false (with or without override), * otherwise, it will calculate the automatic capacity. * isAutoPtr: if given, it will contain true if the automatic capacity is used, false otherwise.

getTurningCapacityByDestination(turning[, isAutoPtr=None])
Parameters:
Return type:

float

Helper function which calculates the capacity given by the destination section for a given turn by using the following method: * - IF the user has overriden the capacity for the destination section and the turning calculates the capacity * automatically, then the capacity is recalculated using the override value (section capacity). * - ELSE returns the capacity given by the destination section of the turning using getObjectDataValueDouble.

getTurningCapacityByOrigin(turning[, isAutoPtr=None])
Parameters:
Return type:

float

Helper function which calculates the capacity given by the origin section for a given turn by using the following method: * - IF the user has overriden the capacity for the origin section and the turning calculates the capacity * automatically, then the capacity is recalculated using the override value (section capacity). * - ELSE returns the capacity given by the origin section of the turning using getObjectDataValueDouble.

getTurningSpeed(turning[, isAutoPtr=None])
Parameters:
Return type:

float

Helper function that calculates the speed to use for a given turn, by using the following method: - IF the user has overriden the speed for the turn, then the override value will be used, disregarding the ‘automatic’ speed setting - UNLESS the user has also overriden the automatic speed setting, in which case we’ll take it into acccount again. - AND: in any case, if, according to the previous rule, we determine that we must use the ‘automatic’ mode, then the speed to be used will be recalculated by extracting the speed values directly from the section, as they migh have been also overriden…

UnknownCommandturning : the turn to calculate the speed for UnknownCommand isAutoPtr: if given, it will contain true if the automatic mode is used, false otherwise. UnknownCommand : speed value

getTurningYellowBoxBehaviour(turning)
Parameters:

turningGKTurning

Return type:

bool

Helper function which returns the yellow box behavior to use for a given turn.

init(aModel)
Parameters:

aModelGKModel

Initializes the class by storing internally the specified model ( no active experiment )

init(experiment)
Parameters:

experimentGKGenericExperiment

Initializes the class by storing internally the experiment to be run and its associated model.

isObjectOverriden(obj)
Parameters:

objGKObject

Return type:

bool

isObjectValueOverriden(obj, column)
Parameters:
Return type:

bool

isObjectValueOverriden(obj, columnName)
Parameters:
Return type:

bool

isObjectValueOverriden(obj, columnId)
Parameters:
Return type:

bool

static overrideChanged(aOverride)
Parameters:

aOverrideGKNetworkAttributesOverride

Call this to notify all the GKModelConnection instances that the specified override has changed.