PyANGKernel.GK

class GK

Synopsis

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

class AggregationType
class NullMeaning
class ODType
class ConnectionType
class RoadSide
class LatitudeLongitudeType
class SizeUnits
class UnitSystem
class DetailLevel
class ObjectDeletionBehaviour
class Conversion
class VehicleCategory
class EngineType
static AddSecondToDisplayFormat(originalFormat, showMillisecs)
Parameters:
  • originalFormat – str

  • showMillisecs – bool

Return type:

str

static AreEqual(a, b[, epsilon=0.001])
Parameters:
  • a – float

  • b – float

  • epsilon – float

Return type:

bool

static BuildAggregationTypeContent(aggType)
Parameters:

aggTypeAggregationType

Return type:

GKContent

static BuildColumnName(prefix, type, contents)
Parameters:
Return type:

str

static BuildComparisonComparedContent(object)
Parameters:

objectGKObject

Return type:

GKContent

static BuildContents(mainId, originator)
Parameters:
  • mainId – str

  • originatorGKObject

Return type:

GKContents

static BuildContents(mainId, originator, userClass)
Parameters:
Return type:

GKContents

static BuildContents(mainId, mainDescription, originator)
Parameters:
  • mainId – str

  • mainDescription – str

  • originatorGKObject

Return type:

GKContents

static BuildContents(mainId, mainDescription, originator, userClass)
Parameters:
Return type:

GKContents

static BuildContentsUC(mainId, userClass)
Parameters:
Return type:

GKContents

static BuildDestinationContent(destination)
Parameters:

destinationGKObject

Return type:

GKContent

static BuildDestinationContentAll()
Return type:

GKContent

static BuildLaneContent(laneIndex)
Parameters:

laneIndex – int

Return type:

GKContent

static BuildLaneContentAll()
Return type:

GKContent

static BuildLastGeneratedContent()
Return type:

GKContent

static BuildLinkContent()
Return type:

GKContent

static BuildMainContent(id[, name=""])
Parameters:
  • id – str

  • name – str

Return type:

GKContent

static BuildODTypeContent(odType)
Parameters:

odTypeODType

Return type:

GKContent

static BuildOriginContent(origin)
Parameters:

originGKObject

Return type:

GKContent

static BuildOriginContentAll()
Return type:

GKContent

static BuildOriginatorContent(o)
Parameters:

oGKObject

Return type:

GKContent

static BuildPTLineTypeContent(ptLine[, meaning=GK.eNullMeansAll])
Parameters:
Return type:

GKContent

static BuildPTLineTypeContentAll()
Return type:

GKContent

static BuildPTRunTypeContent(runStartTime[, meaning=GK.eNullMeansAll])
Parameters:
Return type:

GKContent

static BuildPTRunTypeContent(runStartTime[, meaning=GK.eNullMeansAll])
Parameters:
Return type:

GKContent

static BuildPTRunTypeContentAll()
Return type:

GKContent

static BuildPTSectionSegmentContent(segmentIndex)
Parameters:

segmentIndex – int

Return type:

GKContent

static BuildPTZoneTypeContent(ptZone[, meaning=GK.eNullMeansAll])
Parameters:
Return type:

GKContent

static BuildPTZoneTypeContentAll()
Return type:

GKContent

static BuildPollutantContent(pollutant)
Parameters:

pollutant – str

Return type:

GKContent

static BuildPollutantContentAll()
Return type:

GKContent

static BuildSIContent()
Return type:

GKContent

static BuildSignalGroupContent(sgIndex)
Parameters:

sgIndex – int

Return type:

GKContent

static BuildSignalGroupContentAll()
Return type:

GKContent

static BuildUserClassContent(mobileAgent[, meaning=GK.eNullMeansAll])
Parameters:
Return type:

GKContent

static ColumnLessThan(c1, c2)
Parameters:
Return type:

bool

static ContentAwareCompare(s1, s2)
Parameters:
Return type:

bool

static CreateHRef(object)
Parameters:

objectGKBaseObject

Return type:

str

static DateTimeToSeconds(initialTime, time[, miliseconds=None])
Parameters:
Return type:

int

static DecodeHRef(url)
Parameters:

url – str

Return type:

GKBaseObject

static DegToRad(x)
Parameters:

x – float

Return type:

float

static DownstreamSection(section, sameRoadType[, maxLanes=false])
Parameters:
  • sectionGKSection

  • sameRoadType – bool

  • maxLanes – bool

Return type:

GKSection

static FillComboWithQtEnum(qtEnumName, target)
Parameters:
  • qtEnumName – str

  • targetQComboBox

static FindGroupContaining(m, objects)
Parameters:
  • mGKModel

  • objects – .list of uint

Return type:

GKGroup

static FindWidget(widget, name)
Parameters:
Return type:

QObject

static FloatToString(value[, decimalUnits=2[, roundingUnits=0[, showAsPercentage=false]]])
Parameters:
  • value – float

  • decimalUnits – int

  • roundingUnits – int

  • showAsPercentage – bool

Return type:

str

static GKCopyFile(from, to)
Parameters:
  • from – str

  • to – str

Return type:

bool

static GetAggregatedValue(values, aggregationType)
Parameters:
Return type:

float

static GetCenConnectionType(connections[, connectedObject=None])
Parameters:
  • connections – .QSetGKObjectConnection

  • connectedObjectGKGeoObject

Return type:

ConnectionType

static GetCommonBeginning(a, b)
Parameters:
  • a – str

  • b – str

Return type:

str

static GetCommonEnding(a, b)
Parameters:
  • a – str

  • b – str

Return type:

str

static GetConnectionType(connections[, connectedObject=None])
Parameters:
  • connections – .QSetGKObjectConnection

  • connectedObjectGKGeoObject

Return type:

ConnectionType

static GetConversionName(units, conversion)
Parameters:
Return type:

str

static GetConversionNameTranslated(units, conversion)
Parameters:
Return type:

str

static GetDateTimeDisplayFormatWithSeconds([showMillisecs=false])
Parameters:

showMillisecs – bool

Return type:

str

static GetEnumAggregationType(id)
Parameters:

id – str

Return type:

AggregationType

static GetEnumId(aggType)
Parameters:

aggTypeAggregationType

Return type:

str

static GetEnumId(odType)
Parameters:

odTypeODType

Return type:

str

static GetEnumODType(id)
Parameters:

id – str

Return type:

ODType

static GetEnumString(aggregationType)
Parameters:

aggregationTypeAggregationType

Return type:

str

static GetEnumString(connectionType)
Parameters:

connectionTypeConnectionType

Return type:

str

static GetEnumString(enumValue)
Parameters:

enumValueConversion

Return type:

str

static GetEnumString(enumValue)
Parameters:

enumValueDetailLevel

Return type:

str

static GetEnumString(latitudeLongitude)
Parameters:

latitudeLongitudeLatitudeLongitudeType

Return type:

str

static GetEnumString(meaning)
Parameters:

meaningNullMeaning

Return type:

str

static GetEnumString(odType)
Parameters:

odTypeODType

Return type:

str

static GetEnumString(side)
Parameters:

sideRoadSide

Return type:

str

static GetEnumString(enumValue)
Parameters:

enumValueSizeUnits

Return type:

str

static GetEnumString(enumValue)
Parameters:

enumValueUnitSystem

Return type:

str

static GetExitsTurningsFromApproach(aEntranceApproach)
Parameters:

aEntranceApproachGKSection

Return type:

.std.mapquint32,quint32

static GetGreatestCommonMultiple(aValue1, aValue2)
Parameters:
  • aValue1 – int

  • aValue2 – int

Return type:

int

static GetGroupedObjects(object)
Parameters:

objectGKObject

Return type:

.std.vectorGKObject

static GetLastOriginatorString(id, type)
Parameters:
  • id – str

  • type – str

Return type:

str

static GetLowestCommonMultiple(aValues)
Parameters:

aValues – .std.vectoruint

Return type:

int

static GetMax(values)
Parameters:

values – .list of double

Return type:

float

static GetMax(values)
Parameters:

values – .list of double

Return type:

float

static GetMax(values)
Parameters:

values – .list of int

Return type:

int

static GetMax(values)
Parameters:

values – .list of int

Return type:

int

static GetMaxValueOfColumn(model, type, col[, reference=-1.0[, context=GKContext()]])
Parameters:
Return type:

float

static GetMean(values)
Parameters:

values – .list of double

Return type:

float

static GetMean(values)
Parameters:

values – .std.vectordouble

Return type:

float

static GetMemoryInfo()
Return type:

int

static GetMilestoneName(aimsunDoc)
Parameters:

aimsunDoc – str

Return type:

str

static GetMin(values)
Parameters:

values – .list of double

Return type:

float

static GetMin(values)
Parameters:

values – .list of double

Return type:

float

static GetMin(values)
Parameters:

values – .list of int

Return type:

int

static GetMin(values)
Parameters:

values – .list of int

Return type:

int

static GetObjectsOfType(type[, includeSubTypes=true[, sort=true]])
Parameters:
  • typeGKType

  • includeSubTypes – bool

  • sort – bool

Return type:

.list of GKObject

static GetObjectsOfType(type, scenario[, sort=true])
Parameters:
Return type:

.list of GKObject

static GetObjectsOfType(type, scenarios[, sort=true])
Parameters:
  • typeGKType

  • scenarios – .list of const GKGenericScenario

  • sort – bool

Return type:

.list of GKObject

static GetObjectsThatExists(objects, scenarios)
Parameters:
  • objects – .list of GKObject

  • scenarios – .list of const GKGenericScenario

Return type:

.list of GKObject

static GetProjectName(aimsunDoc)
Parameters:

aimsunDoc – str

Return type:

str

static GetRandomColor(generator)
Parameters:

generatorQRandomGenerator

Return type:

QColor

static GetRelativeDifferencePercent(val, ref)
Parameters:
  • val – float

  • ref – float

Return type:

float

static GetSameColumnWithContents(refCol, appliedContents[, addAppliedContentIfNotContained=false])
Parameters:
  • refColGKColumn

  • appliedContentsGKContents

  • addAppliedContentIfNotContained – bool

Return type:

GKColumn

static GetStdDeviation(values)
Parameters:

values – .list of double

Return type:

float

static GetStdDeviation(values)
Parameters:

values – .std.vectordouble

Return type:

float

static GetSum(values)
Parameters:

values – .list of double

Return type:

float

static GetSum(values)
Parameters:

values – .std.vectordouble

Return type:

float

static GetTimeDisplayFormatWithSeconds([showMillisecs=false])
Parameters:

showMillisecs – bool

Return type:

str

static GetWeightContent(id)
Parameters:

id – str

Return type:

GKContent

static GetWeightedMean(values, weights)
Parameters:
  • values – .list of double

  • weights – .list of double

Return type:

float

static GetWeightedStdDeviation(values, weights)
Parameters:
  • values – .list of double

  • weights – .list of double

Return type:

float

static IsNaN(value)
Parameters:

value – float

Return type:

bool

static IsNull(col, v)
Parameters:
Return type:

bool

static IsZero(a[, epsilon=0.001])
Parameters:
  • a – float

  • epsilon – float

Return type:

bool

static MakeReadableFileName(fn)
Parameters:

fn – str

Return type:

str

static Max(a, b)
Parameters:
  • a – float

  • b – float

Return type:

float

static Max(a, b)
Parameters:
  • a – float

  • b – float

Return type:

float

static Max(a, b)
Parameters:
  • a – int

  • b – int

Return type:

int

static Max(a, b)
Parameters:
  • a – int

  • b – int

Return type:

int

static Min(a, b)
Parameters:
  • a – float

  • b – float

Return type:

float

static Min(a, b)
Parameters:
  • a – float

  • b – float

Return type:

float

static Min(a, b)
Parameters:
  • a – int

  • b – int

Return type:

int

static Min(a, b)
Parameters:
  • a – int

  • b – int

Return type:

int

static Modulo(x, ref)
Parameters:
  • x – float

  • ref – float

Return type:

float

static ObjectLessThan(o1, o2)
Parameters:
Return type:

bool

static ObjectLessThanByExternalId(o1, o2)
Parameters:
Return type:

bool

static ObjectLessThanByName(o1, o2)
Parameters:
Return type:

bool

static PrintTrace()
static QTimeInInterval(iTime, iStart, iEnd)
Parameters:
Return type:

int

static QTimeInInterval(iTime, iStart, iEnd)
Parameters:
Return type:

bool

static RadToDeg(x)
Parameters:

x – float

Return type:

float

static Redon(xn)
Parameters:

xn – float

Return type:

int

static Redon(xn)
Parameters:

xn – float

Return type:

int

static ReduceRect(r, delta)
Parameters:
  • rQRect

  • delta – int

Return type:

QRect

static StringDistance(A, B)
Parameters:
  • A – str

  • B – str

Return type:

int

static Substring(str, pos1, pos2)
Parameters:
  • str – str

  • pos1 – int

  • pos2 – int

Return type:

str

static TimeToSeconds(duration[, miliseconds=None])
Parameters:
Return type:

int

static TimeToSeconds(time[, miliseconds=None])
Parameters:
  • timeQTime

  • milisecondsuint

Return type:

int

static TimeToSecondsDouble(time)
Parameters:

timeGKTimeDuration

Return type:

float

static TimeToSecondsDouble(time)
Parameters:

timeQTime

Return type:

float

static ToGK(p)
Parameters:

p – .list of QPointF

Return type:

GKPoints

static ToGK(p)
Parameters:

pQPointF

Return type:

GKPoint

static ToGK(rect)
Parameters:

rectQRectF

Return type:

GKBBox

static ToODType(connectionType)
Parameters:

connectionTypeConnectionType

Return type:

ODType

static ToQt(bbox)
Parameters:

bboxGKBBox

Return type:

QRectF

static ToQt(p)
Parameters:

pGKPoint

Return type:

QPointF

static ToQt(p)
Parameters:

pGKPoints

Return type:

.list of QPointF

static TypeLessThanByName(o1, o2)
Parameters:
Return type:

bool

static UnitSystemFromPreferenceInt(preferenceIntValue)
Parameters:

preferenceIntValue – int

Return type:

UnitSystem

static UnitSystemToPreferenceInt(system)
Parameters:

systemUnitSystem

Return type:

int

static getEngineTypeName(aEngineType)
Parameters:

aEngineTypeEngineType

Return type:

str

static getOriginatorsFromSource(source)
Parameters:

sourceGKObject

Return type:

.std.vectorGKObject

static getPaletteColor(colorRole)
Parameters:

colorRoleColorRole

Return type:

QColor

static getTSBandSumForSimulationTime(ts, from, to)
Parameters:
Return type:

.std.pairdouble,double

static getTSMeanForSimulationTime(ts, from, to[, useDate=true])
Parameters:
Return type:

float

static getTSSumForSimulationTime(ts, from, to[, useDate=true])
Parameters:
Return type:

float

static intervalOverlapDuration(iStart1, iEnd1, iStart2, iEnd2)
Parameters:
Return type:

GKTimeDuration

static intervalOverlapDuration(iStart1, iEnd1, iStart2, iEnd2)
Parameters:
Return type:

GKTimeDuration

static stripDiacritics(str)
Parameters:

str – str

Return type:

str

static toDouble(aNumber[, ok=Q_NULLPTR])
Parameters:
  • aNumber – str

  • ok – bool

Return type:

float

static toFloat(aNumber[, ok=Q_NULLPTR])
Parameters:
  • aNumber – str

  • ok – bool

Return type:

float