pypsa.pf.find_cycles

Contents

pypsa.pf.find_cycles#

pypsa.pf.find_cycles(sub_network: SubNetwork, weight: str = 'x_pu') None#

Find all cycles in the sub_network and record them in sub_network.C.

networkx collects the cycles with more than 2 edges; then the 2-edge cycles from the MultiGraph must be collected separately (for cases where there are multiple lines between the same pairs of buses).

Cycles with infinite impedance are skipped.