Pathfinder¶
Depth-first search over the undirected bus/branch graph that enumerates every
simple path from a source bus to the active fault bus. The resulting ordered
branch lists are used by ElectricalNetwork to inject the mutual-coupling
Norton sources with the correct sign.
pathfinder ¶
PathFinder Module.
This module provides the PathFinder class, which is responsible for identifying all possible paths
between sources and faults within an electrical network. It utilizes Depth-First Search (DFS) to traverse
the network graph and determine the connectivity between different buses through branches.
The primary use cases include: - Determining all paths from a specific source to a fault point. - Analyzing the network's topology for fault impact assessment. - Facilitating impedance and grounding calculations based on identified paths.
PathFinder ¶
A class to find all paths between sources and faults in a network.
The PathFinder class constructs an adjacency list representation of the network graph and uses
Depth-First Search (DFS) to identify all possible paths between a given source bus and fault bus.
These paths are essential for performing various electrical calculations, including impedance analysis
and grounding assessments.
Initialize the PathFinder with a given Network.
Constructs the adjacency list representation of the network graph based on buses and branches.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
network
|
Network
|
The Network instance containing buses and branches. |
required |
Source code in src/groundinsight/pathfinder.py
find_paths ¶
Find all paths between the source bus and fault bus.
Utilizes Depth-First Search (DFS) to explore all possible routes from the source to the fault.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source_bus_name
|
str
|
The name of the source bus. |
required |
fault_bus_name
|
str
|
The name of the fault bus. |
required |
Returns:
| Type | Description |
|---|---|
List[Path]
|
List[Path]: A list of |