bw_graph_tools.graph_traversal_utils
Attributes
Functions
|
Get the path with the most mass or energetic flow from |
|
Module Contents
- bw_graph_tools.graph_traversal_utils.get_path_from_matrix(matrix: scipy.sparse.spmatrix, source: int, target: int, algorithm: str = 'BF') List[source]
Get the path with the most mass or energetic flow from
source(the function unit) totarget(something deep in the supply chain). Bothsourceandtargetare integer matrix indices.algorithmshould be eitherBF(Bellman-Ford) orJ(Johnson). Dijkstra is not recommended as we have negative weights.Returns a list like
[source, int, int, int, target].