PyANGKernel.GKRoadType

class GKRoadType

Inheritance diagram of PyANGKernel.GKRoadType

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

Detailed Description

Use this class to specify special section attributes. The road type contains attributes for the three simulation models.

class DrawMode

Draw mode of this king of sections

class HCMRoadType
__init__()
decrementSectionsUsingRoadType()

Subtracts 1 from the number of sections that use this road type. Used when deleting a section or changing its road type from this one to another.

getAccelerationVariationFactor()
Return type:

float

getAllowACCAndCACC()
Return type:

bool

getAllowImprudentLaneChanging()
Return type:

bool

getAllowNonLaneBasedMovement()
Return type:

bool

getConsiderTwoLanesCarFollowingModel()
Return type:

bool

getCriticalLookAheadDistance()
Return type:

float

static getDefault(model[, canBeNull=false])
Parameters:
  • modelGKModel

  • canBeNull – bool

Return type:

GKRoadType

Returns the current default road type from model “model”

getDrawMode()
Return type:

DrawMode

Draw mode of this king of sections

getFinalSafetyMargin()
Return type:

float

getFirstUserDefinedCost()
Return type:

float

getFunctionalClass()
Return type:

int

The functional classification of the road type is a number from 1 to 255. FHWA defines three: 1 Arterial, 2 Collector, 3 Local Navteq defines five: 1 for high volume and max speed to 5 for low volume roads

getHCMRoadType()
Return type:

HCMRoadType

getInherentSpeed()
Return type:

float

getInitialSafetyMargin()
Return type:

float

getJamDensityPerLane()
Return type:

float

getJunctionDelayFunction()
Return type:

GKFunctionCost

getLaneCapacity()
Return type:

float

getLaneChangingAggressiveness()
Return type:

float

getLaneChangingChangeLaneCooperation()
Return type:

float

getLaneChangingGapCooperation()
Return type:

float

getLaneWidth()
Return type:

float

getLeftExtraType()
Return type:

int

getLeftExtraWidth()
Return type:

float

getLookAheadDistance()
Return type:

float

getMainStreamVisibilityDistance()
Return type:

float

getMaxCACCPlatoonSize()
Return type:

int

getMesoFinalSafetyMargin()
Return type:

float

getMesoInitialGiveWayTimeFactor()
Return type:

float

getMesoInitialSafetyMargin()
Return type:

float

getMesoLookAheadDistance()
Return type:

float

getMesoMainStreamVisibilityDistance()
Return type:

float

getMesoOnRampCooperationGap()
Return type:

float

getMesoOnRampMergingGap()
Return type:

float

getMesoReactionTimeFactor()
Return type:

float

getNonAllowedVehicles()
Return type:

.list of const GKMobileAgent

List of vehicles and pedestrian types that are not allowed in this road type

getNumberOfSectionsUsingRoadType()
Return type:

int

Returns the number of sections that use this road type.

getOnRampCooperationDistance()
Return type:

float

getOnRampFIFO()
Return type:

bool

getOnRampMergingDistance()
Return type:

float

getPenalizeSharedLanes()
Return type:

bool

getPenalizeSlowLane()
Return type:

bool

getReactionTimeAtStop()
Return type:

float

getReactionTimeAtTrafficLight()
Return type:

float

getReductionEndFactor()
Return type:

float

getReductionStartFactor()
Return type:

float

getReservedLanesVisibilityDistance()
Return type:

float

getReturnToInsideLaneAfterOvertaking()
Return type:

bool

getRightExtraType()
Return type:

int

getRightExtraWidth()
Return type:

float

getSecondUserDefinedCost()
Return type:

float

getSectionAdditionalVolume()
Return type:

float

getSpeed()
Return type:

float

getThirdUserDefinedCost()
Return type:

float

getTurnAdditionalVolume()
Return type:

float

getTurnDynamicCostFunction()
Return type:

GKFunctionCost

getTurnKInitialsCostFunction()
Return type:

GKFunctionCost

getTurnPenaltyFunction()
Return type:

GKFunctionCost

getVisibilityDistance()
Return type:

float

getVolumeDelayFunction()
Return type:

GKFunctionCost

getWaitingTimeBeforeLosingTurn()
Return type:

float

getYellowBoxBehaviour()
Return type:

bool

incrementSectionsUsingRoadType()

Adds 1 to the number of sections that use this road type. Used when adding a section (with this road type as default) or changing its road type from another to this one.

isBannedVehicle(vehicle)
Parameters:

vehicleGKMobileAgent

Return type:

bool

Return true if the vehicle is banned.

isDefault()
Return type:

bool

Returns true is this road type if the default one in its model.

isInternal()
Return type:

bool

Returns true if it is road type. Uses GKRoadType::internalAtt

setAccelerationVariationFactor(factor)
Parameters:

factor – float

setAllowACCAndCACC(allow)
Parameters:

allow – bool

setAllowImprudentLaneChanging(allow)
Parameters:

allow – bool

setAllowNonLaneBasedMovement(value)
Parameters:

value – bool

setAsDefault()

Set this road type as the default road type. Unmark as default any other road type (just one default road type per model).

setBannedVehicle(vehicle, banned)
Parameters:

If banned true, sets vehicle to banned. * If banned false, sets vehicle to not banned.

setConsiderTwoLanesCarFollowingModel(value)
Parameters:

value – bool

setCriticalLookAheadDistance(value)
Parameters:

value – float

setDrawMode(value)
Parameters:

valueDrawMode

Draw mode of this king of sections

setFinalSafetyMargin(value)
Parameters:

value – float

setFirstUserDefinedCost(cost)
Parameters:

cost – float

setFunctionalClass(value)
Parameters:

value – int

UnknownCommand getFunctionalClass

setHCMRoadType(type)
Parameters:

typeHCMRoadType

setInherentSpeed(speed)
Parameters:

speed – float

setInitialSafetyMargin(value)
Parameters:

value – float

setIsInternal(internal)
Parameters:

internal – bool

setJamDensityPerLane(density)
Parameters:

density – float

setJunctionDelayFunction(function)
Parameters:

functionGKFunctionCost

setLaneCapacity(capacity)
Parameters:

capacity – float

setLaneChangingAggressiveness(value)
Parameters:

value – float

setLaneChangingChangeLaneCooperation(value)
Parameters:

value – float

setLaneChangingGapCooperation(value)
Parameters:

value – float

setLaneWidth(width)
Parameters:

width – float

setLeftExtraType(type)
Parameters:

type – int

setLeftExtraWidth(width)
Parameters:

width – float

setLookAheadDistance(value)
Parameters:

value – float

setMainStreamVisibilityDistance(distance)
Parameters:

distance – float

setMaxCACCPlatoonSize(size)
Parameters:

size – int

setMesoFinalSafetyMargin(distance)
Parameters:

distance – float

setMesoInitialGiveWayTimeFactor(factor)
Parameters:

factor – float

setMesoInitialSafetyMargin(distance)
Parameters:

distance – float

setMesoLookAheadDistance(distance)
Parameters:

distance – float

setMesoMainStreamVisibilityDistance(distance)
Parameters:

distance – float

setMesoOnRampCooperationGap(value)
Parameters:

value – float

setMesoOnRampMergingGap(value)
Parameters:

value – float

setMesoReactionTimeFactor(factor)
Parameters:

factor – float

setNonAllowedVehicles(vehicles)
Parameters:

vehicles – .list of const GKMobileAgent

List of vehicles and pedestrian types that are not allowed in this road type

setNumberOfSectionsUsingRoadType(value)
Parameters:

value – int

Sets the number of sections that use this road type. Used when restoring.

setOnRampCooperationDistance(value)
Parameters:

value – float

setOnRampFIFO(value)
Parameters:

value – bool

setOnRampMergingDistance(value)
Parameters:

value – float

setPenalizeSharedLanes(penalize)
Parameters:

penalize – bool

setPenalizeSlowLane(penalize)
Parameters:

penalize – bool

setReactionTimeAtStop(value)
Parameters:

value – float

setReactionTimeAtTrafficLight(value)
Parameters:

value – float

setReductionEndFactor(value)
Parameters:

value – float

setReductionStartFactor(value)
Parameters:

value – float

setReservedLanesVisibilityDistance(distance)
Parameters:

distance – float

setReturnToInsideLaneAfterOvertaking(value)
Parameters:

value – bool

setRightExtraType(type)
Parameters:

type – int

setRightExtraWidth(width)
Parameters:

width – float

setSecondUserDefinedCost(cost)
Parameters:

cost – float

setSectionAdditionalVolume(volume)
Parameters:

volume – float

setSpeed(speed)
Parameters:

speed – float

setThirdUserDefinedCost(cost)
Parameters:

cost – float

setTurnAdditionalVolume(volume)
Parameters:

volume – float

setTurnDynamicCostFunction(function)
Parameters:

functionGKFunctionCost

setTurnKInitialsCostFunction(function)
Parameters:

functionGKFunctionCost

setTurnPenaltyFunction(function)
Parameters:

functionGKFunctionCost

setVisibilityDistance(distance)
Parameters:

distance – float

setVolumeDelayFunction(function)
Parameters:

functionGKFunctionCost

setWaitingTimeBeforeLosingTurn(time)
Parameters:

time – float

setYellowBoxBehaviour(enable)
Parameters:

enable – bool

unSetAsDefault()

Unsets this road type as the default road type.

updateNumberOfSectionsInRoadType()

Counts the number of sections in this road type and updates the attribute

updateSectionsInRoadType()

Applies the parameters of this road type to all of its sections.