run_uk_sweep#

popo.powerflow.run_uk_sweep(build_circuit, customers_of, monitor, kv, horizon, pv_profile, ev_profiles, ev_levels=(0.0, 0.2, 0.4, 0.6), pv_levels=(0.0, 0.2, 0.4, 0.6), volt_var=None, sizing=None, mv_voltage=None, weather_path=None, start='2019-01-01', seed=0, start_step=0, customer_voltages=False)#

Sweep EV x PV penetration on one UK-style feeder with one substation.

This is the DSS-UK case study: a stiff or weak secondary substation selected by voltage sensitivity, with independent customer power-factor profiles and a Q(U) droop on PV inverters decoupling P from Q, and the MV source voltage following a demand-dependent profile within a tap-changer deadband. monitor is one transformer rather than a population, and the result frame carries the feeder-head quantities solve_time_series() already records for every monitored transformer.

Parameters:
  • build_circuit (Callable[[], Any]) – Returns an already-compiled circuit, with base household loads attached, fresh for each scenario. Installing an MV-voltage loadshape onto Vsource.Source before returning is the caller’s job if mv_voltage is not given here.

  • customers_of (Callable[[Any], Sequence[tuple[str, str]]]) – Eligible (load name, bus) pairs for DER installation, given the compiled circuit.

  • monitor (Transformer) – The transformer to record.

  • kv (float) – Service voltage of a customer connection.

  • horizon (int) – Number of steps to solve per scenario.

  • pv_profile (ndarray) – Per-unit generation profile, shared across the sweep.

  • ev_profiles (ndarray) – Charging power, shape (intervals, vehicles).

  • ev_levels (Sequence[float]) – EV penetrations to sweep.

  • pv_levels (Sequence[float]) – PV penetrations to sweep.

  • volt_var (VoltVarCurve | None) – Reactive characteristic installed with any PV; None leaves inverters at unity power factor.

  • sizing (ArraySizing | None) – Rooftop array size distribution; defaults to a domestic one.

  • mv_voltage (MVVoltageProfile | None) – If given, built once per scenario and written onto the circuit’s source as a daily/yearly loadshape before DER is attached, reproducing the original runner’s varying MV busbar.

  • weather_path (Path | None) – If given, the sweep’s output is joined with irradiance and temperature from this path via popo.network.weather.attach_weather().

  • start (str) – First timestamp of the horizon, stamped onto every scenario.

  • seed (int) – Seed for customer and DER-size draws, fixed across the sweep so the same customers hold the technology at every level.

  • start_step (int) – Step offset at which every scenario begins solving.

  • customer_voltages (bool) – Also record v_cust_min_pu, v_cust_p05_pu and v_cust_max_pu over each monitored transformer’s own customers, found by popo.network.transformer_customers(). Compliance with a voltage standard is judged there, not at the busbar.

Return type:

SweepResult

Returns:

A SweepResult with one row per step and scenario, and, when weather_path is given, the joined weather columns.