pypsa.SubNetwork.calculate_BODF

pypsa.SubNetwork.calculate_BODF#

SubNetwork.calculate_BODF(skip_pre: bool = False) None#

Calculate the Branch Outage Distribution Factor (BODF) for sub_network.

Sets sub_network.BODF as a (dense) numpy array.

The BODF is a num_branch x num_branch 2d array.

For the outage of branch l, the new flow on branch k is given in terms of the flow before the outage

f_k^after = f_k^before + BODF_{kl} f_l^before

Note that BODF_{ll} = -1.

Parameters:
  • sub_network (pypsa.SubNetwork)

  • skip_pre (bool, default False) – Skip the preliminary step of computing the PTDF.