pyorps.graph.api.igraph_api
PYORPS: An Open-Source Tool for Automated Power Line Routing
Reference: [1] Hofmann, M., Stetz, T., Kammer, F., Repo, S.: ‘PYORPS: An Open-Source Tool for
Automated Power Line Routing’, CIRED 2025 - 28th Conference and Exhibition on Electricity Distribution, 16 - 19 June 2025, Geneva, Switzerland
Classes
|
Initialize the graph library API. |
- class pyorps.graph.api.igraph_api.IGraphAPI(raster_data, steps, ignore_max=True, from_nodes=None, to_nodes=None, cost=None, **kwargs)[source]
Bases:
GraphLibraryAPIInitialize the graph library API.
- Parameters:
raster_data (ndarray[int]) – 2D numpy array representing the raster
steps (ndarray[int]) – Array defining the neighborhood connections
ignore_max (bool | None) – Ignore edges whose weights are greater or equal to the maximum
data (value in the raster)
from_nodes (ndarray | None) – Source node indices for edges
to_nodes (ndarray | None) – Target node indices for edges
cost (ndarray | None) – Edge weights
- create_graph(from_nodes, to_nodes, cost=None, **kwargs)[source]
Creates a graph object with the igraph library.
- Parameters:
- Returns:
The graph object
- Return type:
igraph.Graph
- get_number_of_nodes()[source]
Returns the number of nodes in the graph.
- Returns:
The number of nodes
- get_number_of_edges()[source]
Returns the number of edges in the graph.
- Returns:
The number of edges