PyANGKernel.GKTraversal¶
- class GKTraversal¶
Base class for calculating a traversal matrix for a sub-area
Details
Class for calculating a traversal matrix for a sub-area. It contains all the input data needed for the traversal and the output data obtained once the traversal has been calculated.
Synopsis¶
Methods¶
def
__init__()def
calculateGates()def
getExitGates()def
getSubNetwork()def
setSubNetwork()
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 GKTraversalPercentagesTypes¶
The different ways of assigning the percentages to the connections for the centroids that are created but that have an equivalent centroid on the network. That is, the original centroids that are located inside the sub-area. The options are: - eAssignment: to assign the percentages that the static traffic assignment has calculated to each connection - eOriginal: to assign the same percentages they had in the original centroid configuration - eNone: to do not assign any percentage
- __init__(scenario)¶
- Parameters:
scenario –
GKGenericScenario
- calculateGates(scenario)¶
- Parameters:
scenario –
GKGenericScenario
Function that needs to be called after the sub-area and the original centroid configuration have been defined to calculate the entrance and exit gates for the traversal
- calculatePublicTransport(scenario)¶
- Parameters:
scenario –
GKGenericScenario
Function that needs to be called after the subnetwork and the public plan have been defined to calculate the new public plan * for the target subnetwork
- getEntranceGates()¶
- Return type:
Dictionary with keys of type .int and values of type GKSection.
Returns a map with all the sections that are considered entrance gates for the traversal calculation because they are in the borders of the sub-area. The key of the map is the section id and the data the section itself
- getEntranceGatesCentroids()¶
- Return type:
Dictionary with keys of type .GKGeoObject and values of type const GKCentroid.
Returns a map with all the sections considered as entrance gates and their corresponding centroid in the traversal centroid configuration
- getExitGates()¶
- Return type:
Dictionary with keys of type .int and values of type GKSection.
Returns a map with all the sections that are considered exit gates for the traversal calculation because they are in the borders of the sub-area. The key of the map is the section id and the data the section itself
- getExitGatesCentroids()¶
- Return type:
Dictionary with keys of type .GKGeoObject and values of type const GKCentroid.
Returns a map with all the sections considered as exit gates and their corresponding centroid in the traversal centroid configuration
- getInsideCentroidsEntranceGates()¶
- Return type:
Dictionary with keys of type .const GKCentroid and values of type int.
Returns a map with all the centroids from the original centroid configuration with entrance connections, that are located inside the sub-area and therefore produce additional entrance gates. The map contains, for each original centroid, a new list of objects that are connected to the centroid and also inside the sub-area. These objects will be a subset of all the original centroid connections. The original connections that are not included in the sub-area will not be present. The key of this second map is the section id and the data the section itself
- getInsideCentroidsExitGates()¶
- Return type:
Dictionary with keys of type .const GKCentroid and values of type int.
Returns a map with all the centroids from the original centroid configuration with exit connections, that are located inside the sub-area and therefore produce additional exit gates. The map contains, for each original centroid, a new list of objects that are connected to the centroid and also inside the sub-area. These objects will be a subset of all the original centroid connections. The original connections that are not included in the sub-area will not be present. The key of this second map is the section id and the data the section itself
- getInsideGatesCentroids()¶
- Return type:
Dictionary with keys of type .const GKCentroid and values of type GKCentroid.
Returns a map with all the original centroids inside the sub-area and their corresponding centroid in the traversal centroid configuration
- getPTEntranceGates()¶
- Return type:
Dictionary with keys of type .int and values of type GKSection.
Returns a map with all the sections that are the first section in Transit routes that start inside de subnetwork. The key of the map is the section id and the data the section itself
- getPublicLinePlan()¶
- Return type:
- getSubNetwork()¶
- Return type:
It returns the subarea the traversal matrix has been calculated for
- getTrafficDemand()¶
- Return type:
It returns the traffic demand that has been used to calculate the traversal
- getTraversalCentroidConfiguration()¶
- Return type:
It returns the centroid configuration where all the created traversal matrices will be added to. This centroid configuration can be a new one, or an existing one that matched all the needed centroid locations
- getTypeOfPercentageInInternalCentroids()¶
- Return type:
It returns whether to keep the original percentages defined for microsimulation in the internal centroids (the ones inside the subnetwork), to assign the new percentages calculated by the assignment algorithm or to do not assign any percentage to the internal centroids
- static get_source_centroid_configuration(centroid_configuration)¶
- Parameters:
centroid_configuration –
GKCentroidConfiguration- Return type:
- setPublicLinePlan(publicLinePlan)¶
- Parameters:
publicLinePlan –
GKPublicLinePlan
- setSubNetwork(pNet)¶
- Parameters:
pNet –
GKProblemNet
Sets the subnetwork, the traversal will be calculated to
- setTrafficDemand(trafficDemand)¶
- Parameters:
trafficDemand –
GKTrafficDemand
Sets the valid centroid configurations in the traffic demand
- setTypeOfPercentageInInternalCentroids([value=GKTraversal.eAssignment])¶
- Parameters:
value –
GKTraversalPercentagesTypes
Sets whether to keep original percentages in the internal centroids (
eOriginal), to set to these internal centroids the percentages given from the assignment (eAssignment) or to not assign any percentage (eNone)