pypsa.pf.sub_network_pf_singlebus

pypsa.pf.sub_network_pf_singlebus#

pypsa.pf.sub_network_pf_singlebus(sub_network: SubNetwork, snapshots: Sequence | None = None, skip_pre: float = False, distribute_slack: bool = False, slack_weights: str | pd.Series = 'p_set', linear: bool = False) tuple[int, float, bool]#

Non-linear power flow for a sub-network consiting of a single bus.

Parameters:
  • snapshots (list-like|single snapshot) – A subset or an elements of n.snapshots on which to run the power flow, defaults to n.snapshots

  • skip_pre (bool, default False) – Skip the preliminary steps of computing topology, calculating dependent values and finding bus controls.

  • distribute_slack (bool, default False) – If True, distribute the slack power across generators proportional to generator dispatch by default or according to the distribution scheme provided in slack_weights. If False only the slack generator takes up the slack.

  • slack_weights (pandas.Series|str, default 'p_set') – Distribution scheme describing how to determine the fraction of the total slack power a bus of the sub-network takes up. Default is to distribute proportional to generator dispatch (‘p_set’). Another option is to distribute proportional to (optimised) nominal capacity (‘p_nom’ or ‘p_nom_opt’). Custom weights can be provided via a pandas.Series/dict that has the generators of the single bus as index/keys.