Bring PR #113 (flow-path timeslice tagging) commits onto main#118
Merged
Conversation
The custom-constraints templater emits region-tagged timeslices (qld_peak_demand etc.) lifted from PLEXOS, but the IASR-derived flow-path limits carried region-agnostic ones (peak_demand). For intraregional links that's harmless, but for interregional links the two tables couldn't be lined up — it wasn't clear which region's demand condition a cross-region limit belonged to. The PLEXOS model resolves it consistently: a path's forward limit is tagged with the destination region's demand condition and its reverse limit with the origin region's, because the receiving region's load is what tightens the limit. This applies that rule while the sub-regional limits are built (before any granularity aggregation, so a REZ stays symmetric even when single_region retargets its geo_to to NEM), prefixing each timeslice with the lowercased region id so the flow-path and custom-constraint tables share one vocabulary. See #109. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The region->region identities in _build_geo_region_lookup were unexercised. The documented parallel-path injection case (CNSW-SNW) is intra-region, so it drops out at nem_regions and nothing reached _add_region_to_timeslices with endpoints that are already NEM regions. This pins that path: a cross-region corridor whose only base sibling is suffixed is injected at nem_regions and must still read forward=qld, reverse=nsw — which needs the identities to resolve NSW/QLD. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Captures the conventions used for this PR so future descriptions are consistent: lead with the story, include a directory-tree diagram, flag the non-obvious design choices, drop sections that say nothing distinctive, and keep the tone dry and understated rather than effusive. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This helper was only exercised through the end-to-end transmission template test, so its error branch (a path endpoint missing from the geography) and its all-rows-collapsed early return had no coverage, and any regression in the forward/reverse region tagging would surface as a failure of the orchestrator rather than the helper. Add direct tests for the happy path, the all-collapsed passthrough, and the missing-geo ValueError. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Tag flow-path limit timeslices with their region's demand condition
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
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.
PR #113 ("Tag flow-path limit timeslices with their region's demand condition")
was merged into the
new-manually-extracted-tablesbranch instead ofmain, soits commits never reached
main. This PR brings that already-reviewed workacross — there are no new changes beyond what was in #113.
Commits:
🤖 Generated with Claude Code