PyANGKernel.GKRoadType¶
- class GKRoadType¶
-
Synopsis¶
Methods¶
def
__init__()def
getDrawMode()def
getHCMRoadType()def
getLaneWidth()def
getOnRampFIFO()def
getSpeed()def
isDefault()def
isInternal()def
setAsDefault()def
setDrawMode()def
setHCMRoadType()def
setIsInternal()def
setLaneWidth()def
setOnRampFIFO()def
setSpeed()def
unSetAsDefault()
Static functions¶
def
getDefault()
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.
- static getDefault(model[, canBeNull=false])¶
- Parameters:
model –
GKModelcanBeNull – bool
- Return type:
Returns the current default road type from model “model”
Draw mode of this king of sections
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:
- getJunctionDelayFunction()¶
- Return type:
- getNonAllowedVehicles()¶
- Return type:
.list of const GKMobileAgent
List of vehicles and pedestrian types that are not allowed in this road type
Returns the number of sections that use this road type.
- Return type:
- getTurnDynamicCostFunction()¶
- Return type:
- getTurnKInitialsCostFunction()¶
- Return type:
- getTurnPenaltyFunction()¶
- Return type:
- getVolumeDelayFunction()¶
- Return type:
- 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:
vehicle –
GKMobileAgent- Return type:
Return true if the vehicle is banned.
Returns true is this road type if the default one in its model.
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:
vehicle –
GKMobileAgentbanned – bool
If banned true, sets vehicle to banned. * If banned false, sets vehicle to not banned.
See also
- setConsiderTwoLanesCarFollowingModel(value)¶
- Parameters:
value – bool
- setCriticalLookAheadDistance(value)¶
- Parameters:
value – float
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:
type –
HCMRoadType
- setInherentSpeed(speed)¶
- Parameters:
speed – float
- setInitialSafetyMargin(value)¶
- Parameters:
value – float
- setIsInternal(internal)¶
- Parameters:
internal – bool
- setJamDensityPerLane(density)¶
- Parameters:
density – float
- setJunctionDelayFunction(function)¶
- Parameters:
function –
GKFunctionCost
- 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
- 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:
function –
GKFunctionCost
- setTurnKInitialsCostFunction(function)¶
- Parameters:
function –
GKFunctionCost
- setTurnPenaltyFunction(function)¶
- Parameters:
function –
GKFunctionCost
- setVisibilityDistance(distance)¶
- Parameters:
distance – float
- setVolumeDelayFunction(function)¶
- Parameters:
function –
GKFunctionCost
- 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.