PyANGKernel.GKTrafficStateItem¶
- class GKTrafficStateItem¶
Information of a traffic state per section.
Details
This class holds the traffic state of a section. It is composed of: - entrance flow: number of vehicles that enters in a section during the period specified in the
GKTrafficState- keep flow percentage: percentage of vehicles that exits the network in this section - turning percentage: percentage of vehicles that takes a turn, defined by the destination section. - exit flow: number of vehicles that exit a section from each of its turns.Synopsis¶
Methods¶
def
__init__()def
getExitFlow()def
sectionRemoved()def
setExitFlow()def
usesSection()
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__()¶
- clearTurningPercentages()¶
Removes all the turn percentages defined
- getAllTurningPercentages()¶
- Return type:
Dictionary with keys of type .GKSection and values of type GKTrafficStateItemTurning.
Get all the turn percentages stored in this item.
Returns the entrance flow on this section. Note that -1 is returned if undefined
Returns the exit flow using turn to section “toSection”. Note that -1 is returned if undefined
Returns the percentage of vehicles that exits the network in this section. Note that -1 is returned if undefined
Returns the total exit flow. Note that -1 is returned if there is not any exit flow defined
Returns the total percentage assigned to exits. It must be 100.0, anything else is an error. Note that -1 is returned if undefined
Returns the percentage of vehicles that takes a turn to section “toSection”
Removes the turning percentage defined to section “toSection”
A section has been removed, update the internal structures. Called due to a
GKSectiondel command.- setEntranceFlow(value)¶
- Parameters:
value – float
Sets the entrance flow on this section
Sets the exit flow using turn to section “toSection”
- setKeepFlowPercentage(value)¶
- Parameters:
value – float
Sets the percentage of vehicles that exits the network in this section
Sets the percentage of vehicles that takes a turn to section “toSection”
Is this section used in the item?