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 ascreen(frompopo.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, frompopo.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).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 frompopo.network.screening.screen(), used to pick the most heavily loaded transformers to monitor.Nonefalls 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 recordv_cust_min_pu,v_cust_p05_puandv_cust_max_puover each monitored transformer’s own customers, found bypopo.network.transformer_customers(). Compliance with a voltage standard is judged there, not at the busbar.
- Return type:
- Returns:
A
SweepResultwith one row per step, transformer and scenario.