Aimsun Next Scripting  22
Public Member Functions | List of all members
GKModelConnection Class Reference

Public Member Functions

 GKModelConnection ()
 
void init (const GKGenericExperiment *experiment)
 
GKModelgetModel () const
 
const GKGenericExperimentgetExperiment () const
 
bool isObjectValueOverriden (const GKObject *obj, const QString &columnName) const
 
bool isObjectValueOverriden (const GKObject *obj, uint columnId) const
 
bool isObjectValueOverriden (const GKObject *obj, const GKColumn *column) const
 
QVariant getObjectDataValue (const GKObject *obj, const QString &columnName) const
 
QVariant getObjectDataValue (const GKObject *obj, uint columnId) const
 
QVariant getObjectDataValue (const GKObject *obj, const GKColumn *column) const
 
int getObjectDataValueInt (const GKObject *obj, const QString &columnName) const
 
int getObjectDataValueInt (const GKObject *obj, uint columnId) const
 
int getObjectDataValueInt (const GKObject *obj, const GKColumn *column) const
 
double getObjectDataValueDouble (const GKObject *obj, const QString &columnName) const
 
double getObjectDataValueDouble (const GKObject *obj, uint columnId) const
 
double getObjectDataValueDouble (const GKObject *obj, const GKColumn *column) const
 
bool getObjectDataValueBool (const GKObject *obj, const QString &columnName) const
 
bool getObjectDataValueBool (const GKObject *obj, uint columnId) const
 
bool getObjectDataValueBool (const GKObject *obj, const GKColumn *column) const
 
QString getObjectDataValueString (const GKObject *obj, const QString &columnName) const
 
QString getObjectDataValueString (const GKObject *obj, uint columnId) const
 
QString getObjectDataValueString (const GKObject *obj, const GKColumn *column) const
 
GKObjectgetObjectDataValueObject (const GKObject *obj, const QString &columnName) const
 
GKObjectgetObjectDataValueObject (const GKObject *obj, uint columnId) const
 
GKObjectgetObjectDataValueObject (const GKObject *obj, const GKColumn *column) const
 
double getTurningSpeed (const GKTurning *turning, bool *isAutoPtr=NULL) const
 
bool getTurningYellowBoxBehaviour (const GKTurning *turning) const
 
double getTurningAttractivenessByVehicleType (const GKTurning *turning, const GKVehicle *vehicleType, bool *usesCapacityAsAttractivenessPtr=nullptr) const
 
double getTurningCapacity (const GKTurning *turning, bool *isAutoPtr=NULL) const
 
double getTurningCapacityByOrigin (const GKTurning *turning, bool *isAutoPtr=NULL) const
 
double getTurningCapacityByDestination (const GKTurning *turning, bool *isAutoPtr=NULL) const
 
GKSectionLane getSectionLane (const GKSection *section, uint lanePos) const
 
QVector< GKSectionLanegetSectionLanes (const GKSection *section) const
 
bool canUseVehicleInSection (const GKSection *section, const GKMobileAgent *agent) const
 

Detailed Description

This class is intended to be used as a base class for the different model-to-simulator classes we have in Aimsun, like i.e.:

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

Constructor & Destructor Documentation

◆ GKModelConnection()

GKModelConnection::GKModelConnection ( )

Member Function Documentation

◆ canUseVehicleInSection()

bool GKModelConnection::canUseVehicleInSection ( const GKSection section,
const GKMobileAgent agent 
) const

Returns true if the given mobile agent can use this section. First looks if the mobile agent is banned for this roadType or section, then, if it' i's a vehicle, looks at the different lanes to see if they are reserved.

◆ getExperiment()

const GKGenericExperiment * GKModelConnection::getExperiment ( ) const

◆ getModel()

GKModel * GKModelConnection::getModel ( ) const

◆ getObjectDataValue() [1/3]

QVariant GKModelConnection::getObjectDataValue ( const GKObject obj,
const GKColumn column 
) const

Get value of specified object and column

◆ getObjectDataValue() [2/3]

QVariant GKModelConnection::getObjectDataValue ( const GKObject obj,
const QString &  columnName 
) const

Get value of specified object and column

◆ getObjectDataValue() [3/3]

QVariant GKModelConnection::getObjectDataValue ( const GKObject obj,
uint  columnId 
) const

Get value of specified object and column

◆ getObjectDataValueBool() [1/3]

bool GKModelConnection::getObjectDataValueBool ( const GKObject obj,
const GKColumn column 
) const

Get bool value of specified object and column

◆ getObjectDataValueBool() [2/3]

bool GKModelConnection::getObjectDataValueBool ( const GKObject obj,
const QString &  columnName 
) const

Get bool value of specified object and column

◆ getObjectDataValueBool() [3/3]

bool GKModelConnection::getObjectDataValueBool ( const GKObject obj,
uint  columnId 
) const

Get bool value of specified object and column

◆ getObjectDataValueDouble() [1/3]

double GKModelConnection::getObjectDataValueDouble ( const GKObject obj,
const GKColumn column 
) const

Get double value of specified object and column

◆ getObjectDataValueDouble() [2/3]

double GKModelConnection::getObjectDataValueDouble ( const GKObject obj,
const QString &  columnName 
) const

Get double value of specified object and column

◆ getObjectDataValueDouble() [3/3]

double GKModelConnection::getObjectDataValueDouble ( const GKObject obj,
uint  columnId 
) const

Get double value of specified object and column

◆ getObjectDataValueInt() [1/3]

int GKModelConnection::getObjectDataValueInt ( const GKObject obj,
const GKColumn column 
) const

Get int value of specified object and column

◆ getObjectDataValueInt() [2/3]

int GKModelConnection::getObjectDataValueInt ( const GKObject obj,
const QString &  columnName 
) const

Get int value of specified object and column

◆ getObjectDataValueInt() [3/3]

int GKModelConnection::getObjectDataValueInt ( const GKObject obj,
uint  columnId 
) const

Get int value of specified object and column

◆ getObjectDataValueObject() [1/3]

GKObject * GKModelConnection::getObjectDataValueObject ( const GKObject obj,
const GKColumn column 
) const

Get GKObject value of specified object and column

◆ getObjectDataValueObject() [2/3]

GKObject * GKModelConnection::getObjectDataValueObject ( const GKObject obj,
const QString &  columnName 
) const

Get GKObject value of specified object and column

◆ getObjectDataValueObject() [3/3]

GKObject * GKModelConnection::getObjectDataValueObject ( const GKObject obj,
uint  columnId 
) const

Get GKObject value of specified object and column

◆ getObjectDataValueString() [1/3]

QString GKModelConnection::getObjectDataValueString ( const GKObject obj,
const GKColumn column 
) const

Get string value of specified object and column

◆ getObjectDataValueString() [2/3]

QString GKModelConnection::getObjectDataValueString ( const GKObject obj,
const QString &  columnName 
) const

Get string value of specified object and column

◆ getObjectDataValueString() [3/3]

QString GKModelConnection::getObjectDataValueString ( const GKObject obj,
uint  columnId 
) const

Get string value of specified object and column

◆ getSectionLane()

GKSectionLane GKModelConnection::getSectionLane ( const GKSection section,
uint  lanePos 
) const

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

◆ getSectionLanes()

QVector< GKSectionLane > GKModelConnection::getSectionLanes ( const GKSection section) const

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

◆ getTurningAttractivenessByVehicleType()

double GKModelConnection::getTurningAttractivenessByVehicleType ( const GKTurning turning,
const GKVehicle vehicleType,
bool *  usesCapacityAsAttractivenessPtr = nullptr 
) const

◆ getTurningCapacity()

double GKModelConnection::getTurningCapacity ( const GKTurning turning,
bool *  isAutoPtr = NULL 
) const

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()

double GKModelConnection::getTurningCapacityByDestination ( const GKTurning turning,
bool *  isAutoPtr = NULL 
) const

Helper function which calculates the capacity given by the destination section for a given turn by using the following method:

  • IF the user has overridden 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()

double GKModelConnection::getTurningCapacityByOrigin ( const GKTurning turning,
bool *  isAutoPtr = NULL 
) const

Helper function which calculates the capacity given by the origin section for a given turn by using the following method:

  • IF the user has overridden 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()

double GKModelConnection::getTurningSpeed ( const GKTurning turning,
bool *  isAutoPtr = NULL 
) const

Get the turn speed for specified turn

◆ getTurningYellowBoxBehaviour()

bool GKModelConnection::getTurningYellowBoxBehaviour ( const GKTurning turning) const

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

◆ init()

void GKModelConnection::init ( const GKGenericExperiment experiment)

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

◆ isObjectValueOverriden() [1/3]

bool GKModelConnection::isObjectValueOverriden ( const GKObject obj,
const GKColumn column 
) const

Check if specified object is overridden for specified column

◆ isObjectValueOverriden() [2/3]

bool GKModelConnection::isObjectValueOverriden ( const GKObject obj,
const QString &  columnName 
) const

Check if specified object is overridden for specified column

◆ isObjectValueOverriden() [3/3]

bool GKModelConnection::isObjectValueOverriden ( const GKObject obj,
uint  columnId 
) const

Check if specified object is overridden for specified column

© Aimsun SLU
Aimsun ®