run_us_sweep#

popo.powerflow.run_us_sweep(build_circuit, customers_of, all_transformers, 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, screen=None, monitor_count=30, start_step=0, seed=0, customer_voltages=False)#

Sweep EV x PV penetration on a North American feeder of pole transformers.

Unlike the UK case, the constraint that binds first is thermal, so the quantity under test is apparent power against each transformer’s own kVA rating rather than a single substation’s voltage. The monitored sample is fixed across scenarios via popo.network.transformers.select_by_utilisation(), which is why a screen (from popo.network.screening.screen()) matters here: a uniform sample of a feeder this size is dominated by lightly loaded transformers and the sweep would have nothing to measure.

Parameters:
  • build_circuit (Callable[[], Any]) – Returns an already-compiled circuit, with base SMART-DS loads attached, fresh for each scenario.

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

  • all_transformers (DataFrame) – Every pole transformer on the feeder, from popo.network.transformers.read_transformers().

  • 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.

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

  • screen (DataFrame | None) – Screening result from popo.network.screening.screen(), used to pick the most heavily loaded transformers to monitor. None falls back to a uniform sample.

  • monitor_count (int) – Number of transformers to monitor per scenario.

  • start_step (int) – Step offset at which every scenario begins solving, chosen to fall in the feeder’s peak season.

  • seed (int) – Seed for customer and DER-size draws, and for the uniform fallback sample.

  • 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, transformer and scenario.