feat(solve): aggregate interface transmission limits (RESOLVE CAISO import/export caps) (CPUC stack 3/5) - #797
ktehranchi wants to merge 1 commit into
Conversation
…p, PR 3) Rewires the two dead config keys `model_topology.interface_transmission_limits` and `electricity.transmission_interface_limits`: the RESOLVE interface table is now applied as a per-snapshot MW cap on the aggregate flow across each interface. Scope is the electricity import/export Links added by add_extra_components, so the constraint is inert when trade is disabled. Region_2 entries that are inside the network contribute no trade links, so internal AC lines escape the cap; that understatement is documented in the module, not corrected here. 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 |
Part of the CPUC/SERVM California stack (independent of #796; consumed by the CA config in stack PR 4/5).
Changes proposed in this Pull Request
Rewires the previously-dead config pair
model_topology.interface_transmission_limits(gate) andelectricity.transmission_interface_limits(path torepo_data/config/policy_constraints/transmission_interface_limits.csv) into a live constraint:workflow/scripts/opts/interfaces.py— per CSV row and direction, a per-snapshot cap on the sum of import/export Link flows crossing the interface:flow_21caps imports intoregion_1,flow_12caps exports out of it (orientation corroborated against known CAISO↔NW limits: CA_NWflow_12 = 3,592 MWmatches the ~3.6 GW CAISO→NW export capability). Links are selected by bus membership + carrier, never by name parsing; external{zone}_importsbuses are excluded from the inside-region set (they carrycountry=<zone>, which would otherwise leak them in viaget_region_buses).solve_network.pyextra_functionality; the CSV is declared as an input onsolve_networkandsolve_network_validation.Known, documented understatement: entries in
region_2that are inside the modeled network (e.g.p8in a CA-only run) contribute no trade links, so internal AC lines (p8↔p9, ~300 MW) escape the links-only cap.Testing
pytest -m fast: 195 passed, 1 pre-existing skip (combined stack).test_interfaces.py— 6 passed (GLPK), including a binding-import-cap solve and a no-op run over the real shipped CSV.model_topology.interface_transmission_limits: true, which no shipped config sets until stack PR 4).Checklist
pre-commitandpytest -m fastpass locally.workflow/envs/environment.yaml(no dependency changes).workflow/repo_data/config/config.default.yaml(keys already existed; behavior documented in stack PR 4's configtables/prose updates).docs/source/configtables/*.csv(arrives with stack PR 4).🤖 Generated with Claude Code