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.

Inheritance diagram of PyANGKernel.GKSuperNode

Synopsis

Methods

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.

addNode(iNode)
Parameters:

iNodeGKNode

Adds a new node to the Supernode

conflictingTrajectories(scenario, trajectory, conflictTrajectory)
Parameters:
Return type:

bool

Returns if these two trajectories’ cross paths under the given scenario, bothering other vehicles.

entranceSections()
Return type:

.list of GKSection

Returns all the sections leading to this Supernode, unfiltered by context.

exitSections()
Return type:

.list of GKSection

Returns all the exit sections in this Supernode, unfiltered by context.

getNodes()
Return type:

.list of GKNode

Gets all the nodes belonging to this Supernode

getTrajectoriesByDestination(section)
Parameters:

sectionGKSection

Return type:

.list of GKSuperNodeTrajectory

Returns all the trajectories that have ‘section’ as its exit section.

getTrajectoriesByOrigin(section)
Parameters:

sectionGKSection

Return type:

.list of GKSuperNodeTrajectory

Returns all the trajectories that have ‘section’ as its entrance section.

getTrajectoryByOD(entranceSection, exitSection)
Parameters:
Return type:

GKSuperNodeTrajectory

Returns the trajectory associated to ‘origin’ and ‘destination’ sections in this Supernode.

harmoniousTrajectories(scenario, trajectory, conflictTrajectory)
Parameters:
Return type:

bool

Returns if these two trajectories’ share the initial turning under the given scenario, helping flow.

hasNode(iNode)
Parameters:

iNodeGKNode

Return type:

bool

Returns whether a node belongs to a Supernode or not.

hasUserDefinedConflict(trjA, trjB)
Parameters:
Return type:

bool

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.

innerSections()
Return type:

.list of GKSection

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

removeNode(iNode)
Parameters:

iNodeGKNode

Removes the specified node from the Supernode

removeTrajectory(trj)
Parameters:

trjGKSuperNodeTrajectory

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:

Activates or deactivates a user-defined conflict in the SuperNode.

setUserDefinedConflictsActive(active)
Parameters:

active – bool

Enable/disable user-defined conflicts for this SuperNode

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:
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:
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.

turnings()
Return type:

.list of GKTurning

Returns all the turnings in this Supernode, unfiltered by context.

userDefinedConflictsActive()
Return type:

bool

Returns true if the user-defined conflicts are active for this SuperNode

userDefinedConflictsFor(trj)
Parameters:

trjGKSuperNodeTrajectory

Return type:

.list of const GKSuperNodeTrajectory

Returns a list with all the user-defined conflicts that affect a given trajectory