Repository navigation
Prompt user if too few representative periods, islanded zones, or failed RA - #243
Open
patrickbrown4 wants to merge 11 commits into
Open
patrickbrown4 wants to merge 11 commits into
patrickbrown4 wants to merge 11 commits into
Conversation
bsergi
self-requested a review
October 7, 2026 20:51
This branch has not been deployed
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.
Summary
This PR addresses #35 (and a few other conditions that may surprise the user) by raising a prompt or error in the following conditions:
GSw_HourlyClusterAlgorithm = optimizedand a small number of the levels specified byGSw_HourlyClusterRegionLevelGSw_Region = transreg/PJM, which unrealistically islands the PJM parts of IL and MIstress_periods.pyand is bypassed ifdebug > 0Note that the Pacific test case will fail the first check! To avoid the prompt for small test cases, add the
-for--forceflag when starting your run. Single-character flags can be combined with other flags. Any of the following would work:Or you could add the following alias to your
~/.bashrc(on kestrel) or~/.bash_profile(local) file:alias testreeds='python runreeds.py -f'and then
testreeds -b v20261002_mainM0 -c test -s PacificBut you should be careful not to get in the habit of bypassing the check when doing actual analysis.
Technical details
Implementation notes
GSw_HourlyClusterAlgorithm = 'hierarchical'GSw_HourlyNumClusters = 365Additional changes
cases_test.csv: ChangedPacific_2020(which is mostly covered by other tests) toNY_365to provide an example of running a region with 365 dayscheck_compatibility()fromrunreeds.pytoreeds.checksto keep all the checks togetherIssues resolved
#35
Relevant sources or documentation
The 'optimized' representative day selection + weighting method, and the reasons why it produces a small number of periods when running a small number of zones, are described in https://doi.org/10.1016/j.energy.2025.135830.
Validation, testing, and comparison report(s)
Because the model itself is not affected, I only ran the Pacific test case (which shows zero change).
Checklist for author
Details to double-check
General information to guide review
Did you use LLM tools (chatbot or copilot) in the preparation of this PR? If so, describe how
No