pypowsybl.network.scalable.ProportionalScalable.from_injections_and_distribution_mode

classmethod ProportionalScalable.from_injections_and_distribution_mode(injection_ids, network, mode, min_value=None, max_value=None)[source]

Create a ProportionalScalable from a list of injection IDs, computing their respective percentage of power repartition according to a given distribution mode.

For example, with UNIFORM_DISTRIBUTION, all injections will have the same percentage, which is 1 / len(injection_ids).

Parameters:
  • injection_ids (List[str]) – List of injection IDs.

  • network (Network) – Network with which to compute the percentages according to “mode”.

  • mode (pypowsybl._pypowsybl.DistributionMode) – Distribution mode to use for computing percentages The available modes are : UNIFORM_DISTRIBUTION, PROPORTIONAL_TO_TARGETP, PROPORTIONAL_TO_PMAX, PROPORTIONAL_TO_DIFF_PMAX_TARGETP, PROPORTIONAL_TO_DIFF_TARGETP_PMIN, PROPORTIONAL_TO_P0

  • min_value (float | None) – Minimum value for the scalable. Defaults to None.

  • max_value (float | None) – Maximum value for the scalable. Defaults to None.

Return type:

ProportionalScalable