attach_generation#

popo.scenarios.attach_generation(dss, customers, penetration, profile, rng, kv, sizing=None, volt_var=None, connection=None, volt_watt=None, derating=None, ambient_temperature=None, inverter_limit_kw=None)#

Give a fraction of customers a rooftop array driven by one profile.

Parameters:
  • dss (Any) – An opendssdirect module with a compiled circuit.

  • customers (Sequence[tuple[str, str]]) – (load name, bus) pairs eligible for installation.

  • penetration (float) – Fraction of customers to fit, in [0, 1].

  • profile (ndarray) – Generation per kWp of array at each interval, in kW/kWp, e.g. a PV-Watts output divided by its array size. It is used as given, not rescaled to its own peak, so a profile peaking at 0.58 kW/kWp drives every array to 58 % of its rating at that peak, and the profile’s mean times 8,760 is the annual yield in kWh/kWp. Values above 1.2 are rejected, as they suggest kW rather than kW/kWp.

  • rng (Generator) – Seeded generator, so the same customers are chosen at every level.

  • kv (float) – Service voltage of the connection.

  • sizing (ArraySizing | None) – Array size distribution; defaults to a domestic rooftop.

  • volt_var (VoltVarCurve | None) – Reactive characteristic to install; None leaves inverters at unity power factor, which decouples reactive power from voltage.

  • connection (str | None) – Bus phase suffix forced on every installation, e.g. ".1.0". None connects each on its customer’s own phase (service_connection()).

  • volt_watt (VoltWattCurve | None) – Active-power curtailment to install; None installs none. Given with volt_var, the two are installed as one combined control (install_volt_var_watt()), as AS/NZS 4777.2 requires.

  • derating (PVDerating | None) – Temperature, DC-loss and inverter-efficiency derating. Give it when profile is plane-of-array irradiance in kW/m2; leave it None when profile is already AC output per kWp.

  • ambient_temperature (ArrayLike | None) – Air temperature in degC, one value per interval; required with derating.

  • inverter_limit_kw (float | None) – Cap on each inverter’s AC output, in kW, as a distributor imposes when it limits a connection’s export. The inverter’s rating is set to the lower of its own and the cap, so generation above the cap is curtailed whatever the customer’s own demand: a conservative stand-in for a dynamic export limit, which would curtail only the net export. None imposes no cap.

Return type:

int

Returns:

Number of installations made.

Raises:

ValueError – If the profile peaks above 1.2 kW/kWp.