feat(config): maintained California configuration on SERVM demand + docs + phase-2/3 stubs (CPUC stack 4/5) - #799
Closed
ktehranchi wants to merge 3 commits into
Closed
ktehranchi wants to merge 3 commits into
ktehranchi wants to merge 3 commits 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>
…ubs (PR 4) Ties the SERVM demand profile (PR 2) and the aggregate interface transmission limits (PR 3) together into a runnable, maintained California entry point. New `workflow/repo_data/config/config.california.yaml`: CA-only Western model on CPUC SERVM 2026 demand, at REeDS-zone resolution (clusters must be 4 — the ReEDS backbone cannot cluster below the four CA zones p8/p9/p10/p11), with planning horizons restricted to SERVM forecast years (2030/2035/2040/2045), the RESOLVE CAISO interface caps switched on, and imports/exports enabled at a 25%-of-demand annual volume limit. A clearly-marked commented alternative carries the county-resolution variant (clusters: 58, simpl: 'county'); the county NARIS flowgate file is selected automatically by `add_extra_components` from `topological_boundaries`. Phase-2 hook `conventional.ambient_derate` is stubbed in both the California and default configs and guarded in `add_electricity`: enabling it raises NotImplementedError rather than silently doing nothing. The comments record that when implemented it REPLACES the EIA-860 seasonal derate and must never stack with it or with a UCAP-derated capacity credit. `retrieve.smk` reserves `retrieve_cpuc_thermal_derate` for the profiles it will need. Tests: `config.test.california.yaml` is a SERVM variant of the CA test harness config. It keeps a full 8760-hour snapshot year — `ReadServm._assign_snapshots` maps its hourly strips positionally onto the network's own per-period snapshots and raises unless the horizon carries exactly 8760, so a truncated window cannot build SERVM demand. Three dry-run cases are added (california -> cluster_network, california -> solve_network, and a county-mode case driven by `--config` overrides), and `tests/integration/test_servm_demand_artifacts.py` asserts weight conservation, demand/network alignment, and the PST->UTC roll against a `--until add_demand` build. Docs: a SERVM section in data-demand.md (source URL pattern, the nine forecast years, the six regions and their balancing-area mapping including the CISO-VEA exclusion, Net-Load-only dispatch with the component-resolved zonal artifact, weather-year semantics, fixed PST, and both calendar caveats); the interface constraint documented in model-constraints.md and data-transmission.md including the p8 gap; the `transmission_interface_limits` config row corrected from "not currently consumed"; a California example in config-spatial.md; and a release-notes entry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks
Collaborator
Author
|
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #798 and merges #797 (base is set to
feat/servm-demand, so this diff also shows #797's commits until the stack merges; retarget as the stack lands).Changes proposed in this Pull Request
workflow/repo_data/config/config.california.yaml— maintained CA-only model:western+model_topology.include: {reeds_state: ['CA']}, ReEDS transport network atreeds_zone(clusters 4 = p8–p11),planning_horizons: [2030, 2035, 2040, 2045],profile: servmwithservm_weather_years: [2019]=renewable_weather_years, imports/exports enabled (wholesale costs, per-flowgate NARIS caps, 25 %-of-annual-load volume limit) andinterface_transmission_limits: true(the feat(solve): aggregate interface transmission limits (RESOLVE CAISO import/export caps) (CPUC stack 3/5) #797 aggregate CAISO caps). A commented county-resolution block documents the finer-grained variant.topological_boundaries: countyresolves end-to-end (58 county clusters, county NARIS flowgates file).config.test.california.yaml+tests/integration/test_servm_demand_artifacts.py— CA integration harness (full 8760-h year:ReadServmmaps strips positionally and requires full-year snapshots; kept cheap via simpl 20 / clusters 4m).conventional.ambient_derateconfig block (default off) with aNotImplementedErrorguard inadd_electricity.py— reserves the design for CPUC unit-level ambient-temperature derating (must replace the seasonal step derate, never stack withucap); retrieve-rule name reserved inretrieve.smk.data-demand.md(region mapping, weather-year semantics, PST timezone, both calendar caveats, VEA note); interface-limit constraint section inmodel-constraints.md+ data note indata-transmission.md(incl. the p8 links-only gap);config-spatial.mdCA example extended; configtables rows corrected (transmission_interface_limitsis no longer "reserved/unused"); release-notes entry.Testing
pytest -m fast: 195 passed, 1 pre-existing skip (combined stack).tests/static tests/docs: 117 passed including 3 new CA dry-run cases (reeds_zone cluster/solve + county mode).tests/integration --collect-only: 32 collected (+14 new). Tier B was not executed in this session — the first real run downloads a 118 MB CPUC CSV and builds a full-year CA network; flagging per the larger-change rule. No equivalence run for this branch (new config; shipped defaults unchanged except additive keys).Checklist
pre-commitandpytest -m fastpass locally.workflow/envs/environment.yaml(no dependency changes).workflow/repo_data/config/config.default.yaml.docs/source/configtables/*.csv.🤖 Generated with Claude Code