PyANGKernel.GKSuperNode¶
- class GKSuperNode¶
A Supernode definition. * Supernodes are used to represent situations in which it is not possible to model the cost of traversing sections and turns using the sum of the individual components; i.e. when the cost of traversing the set of sections and turns is heavily dependent on the movement through them such as at a roundabout, a staggered crossroads, or at a complex junction.
Synopsis¶
Methods¶
def
__init__()def
addNode()def
exitSections()def
getNodes()def
hasNode()def
innerSections()def
removeNode()def
setNodes()def
trajectories()def
turnings()
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__()¶
- activeTrajectories()¶
- Return type:
.list of GKSuperNodeTrajectory
Returns all the active trajectories. Careful, it does not take Overrides into account.
Adds a new node to the Supernode
- conflictingTrajectories(scenario, trajectory, conflictTrajectory)¶
- Parameters:
scenario –
GKGenericScenariotrajectory –
GKSuperNodeTrajectoryconflictTrajectory –
GKSuperNodeTrajectory
- Return type:
Returns if these two trajectories’ cross paths under the given scenario, bothering other vehicles.
Returns all the sections leading to this Supernode, unfiltered by context.
Returns all the exit sections in this Supernode, unfiltered by context.
Gets all the nodes belonging to this Supernode
- getTrajectoriesByDestination(section)¶
- Parameters:
section –
GKSection- Return type:
.list of GKSuperNodeTrajectory
Returns all the trajectories that have ‘section’ as its exit section.
- getTrajectoriesByOrigin(section)¶
- Parameters:
section –
GKSection- Return type:
.list of GKSuperNodeTrajectory
Returns all the trajectories that have ‘section’ as its entrance section.
- getTrajectoryByOD(entranceSection, exitSection)¶
- Parameters:
- Return type:
Returns the trajectory associated to ‘origin’ and ‘destination’ sections in this Supernode.
- harmoniousTrajectories(scenario, trajectory, conflictTrajectory)¶
- Parameters:
scenario –
GKGenericScenariotrajectory –
GKSuperNodeTrajectoryconflictTrajectory –
GKSuperNodeTrajectory
- Return type:
Returns if these two trajectories’ share the initial turning under the given scenario, helping flow.
Returns whether a node belongs to a Supernode or not.
- hasUserDefinedConflict(trjA, trjB)¶
- Parameters:
trjA –
GKSuperNodeTrajectorytrjB –
GKSuperNodeTrajectory
- Return type:
Returns true if there is a user-defined conflict that affects trajectory A caused by trjB.
- inactiveTrajectories()¶
- Return type:
.list of GKSuperNodeTrajectory
Returns all the inactive trajectories. Careful, it does not take Overrides into account.
Returns all the inner sections in this Supernode, unfiltered by context.
- recalculateTrajectories()¶
Function to be called after adding or removing nodes to automatically recalculate the trajectories
Removes the specified node from the Supernode
- removeTrajectory(trj)¶
- Parameters:
trj –
GKSuperNodeTrajectory
Avoid using this. It’s not private because restoring trajectories from older networks might need to erase themselves.
- setNodes(nodes)¶
- Parameters:
nodes – .list of GKNode
Sets all the nodes belonging to this Supernode
- setUserDefinedConflict(affectedTrj, conflictingTrj, active)¶
- Parameters:
affectedTrj –
GKSuperNodeTrajectoryconflictingTrj –
GKSuperNodeTrajectoryactive – bool
Activates or deactivates a user-defined conflict in the SuperNode.
See also
- setUserDefinedConflictsActive(active)¶
- Parameters:
active – bool
Enable/disable user-defined conflicts for this SuperNode
See also
- trajectories()¶
- Return type:
.list of GKSuperNodeTrajectory
Returns all the SuperNodeTrajectories defined for this Supernode, unfiltered by context. Recommended! Filter afterwards using context to consider Geometry configurations and Attribute Overrides.
- trajectorySections(scenario, origin, destination)¶
- Parameters:
scenario –
GKGenericScenarioorigin –
GKSectiondestination –
GKSection
- Return type:
.list of GKSection
Returns the path for the trajectory defined by ‘origin’ and ‘destination’ sections in this Supernode, as a vector of sections. Context aware (scenario). Null scenario means any.
- trajectoryTurnings(scenario, origin, destination)¶
- Parameters:
scenario –
GKGenericScenarioorigin –
GKSectiondestination –
GKSection
- Return type:
.list of GKTurning
Returns the path for the trajectory defined by ‘origin’ and ‘destination’ sections in this Supernode, as a vector of turnings. Context aware (scenario). Null scenario means any.
Returns all the turnings in this Supernode, unfiltered by context.
Returns true if the user-defined conflicts are active for this SuperNode
See also
- userDefinedConflictsFor(trj)¶
- Parameters:
trj –
GKSuperNodeTrajectory- Return type:
.list of const GKSuperNodeTrajectory
Returns a list with all the user-defined conflicts that affect a given trajectory