feat(demand): SERVM region load-allocation weights for California (CPUC stack 1/5) - #796
ktehranchi wants to merge 1 commit into
Conversation
Builds a fractional per-(SERVM region, cluster bus) allocation table so CPUC
SERVM demand for the six California load regions can be disaggregated onto the
simplified network.
The shares are derived by composing the two busmaps (base bus -> substation ->
{simpl} cluster bus) against elec_base_network.nc rather than reading a bus
column of the clustered network: aggregate_to_substations drops
`balancing_area` from the buses, and a cluster can straddle two SERVM regions
anyway (LA County holds both LDWP and CISO-SCE buses). The base network is the
last stage that still carries both `balancing_area` and the population-based
`load_weight`, so the composition recovers where each base bus's weight lands.
A straddling cluster therefore appears once per region it overlaps, each row
carrying only that region's share, and the factors sum to 1.0 within a region.
Balancing areas that are deliberately out of scope (CISO-VEA, Nevada
footprint) keep a row with an empty region in servm_region_map.csv, so an
unknown balancing area introduced by upstream relabeling still hard-fails
while the excluded one is dropped with a logged load share.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
CI note: the 🤖 Generated with Claude Code |
|
Superseded by #801 — the five-PR stack was collapsed into a single PR at the author's request. All commits (plus Tier B fixes) are on |
First of a five-PR stack adding a California-only configuration driven by CPUC SERVM 2026 demand data (stack: #1 → this; #2
feat/servm-demand; #3feat/caiso-interface-limits; #4feat/servm-california; #5feat/cpuc-benchmark).Changes proposed in this Pull Request
Adds a fractional load-allocation-weights artifact mapping the six CPUC SERVM California load regions (IID, LADWP, NCNC, PGE, SCE, SDGE) onto clustered network buses:
workflow/repo_data/CPUC/servm_region_map.csv—balancing_area → servm_region(CISO-VEA kept as an explicit known-but-excluded null row; per the CPUC data dictionary, SERVM's SCE column already includes VEA load).workflow/scripts/build_servm_load_weights.py— composesbusmap_b(base bus → sub_id) withbusmap_s{simpl}(sub_id → cluster bus), groups populationload_weightby (servm_region, cluster bus), and normalizes to per-region allocation factors.rule build_servm_load_weights→resources/demand/{interconnect}/servm_load_weights_s{simpl}.csv.Why busmap composition instead of preserving a bus column:
balancing_area(and, undertopological_boundaries: reeds_zone,county) is dropped inaggregate_to_substations, and preserving a label through clustering trips PyPSA'smake_consenseassert on clusters that straddle regions (real in CA — LA County contains both LADWP and CISO-SCE buses). The weights table represents straddling clusters exactly, touches no clustering code, and is agnostic tosimpl/topological_boundaries(county resolution works unchanged).Testing
pytest -m fast: 195 passed, 1 pre-existing skip (run on the combined 5-PR stack).test_build_servm_load_weights.py— 11 passed (includes a straddling-cluster regression: one cluster containing LDWP + CISO-SCE base buses splits fractionally across both regions).pytest -m integration) not run for this PR. No equivalence run for this branch (additive: new rule + new artifact only; no existing outputs change).Checklist
pre-commitandpytest -m fastpass locally.workflow/envs/environment.yaml(no dependency changes).workflow/repo_data/config/config.default.yaml(no config options in this PR — they arrive in stack Remove shunt impedandes #2/Development #4).docs/source/configtables/*.csv(same).🤖 Generated with Claude Code