Add reserves setpoint duration parameter for storage reserve provision - #1433
Merged
Conversation
Add the optional per-project opchar column reserves_setpoint_duration_hours, the number of hours a storage project must be able to sustain its new setpoint if its reserves are called. It replaces the hardcoded timepoint duration on the reserves side of the stor headroom/footroom energy constraints and the gen_var_stor_hyb headroom energy constraint. When not specified, the timepoint duration is used, so existing scenarios are unchanged. Wire the column through the schema, the projects.tab writer and loader, opchar_param_requirements.csv, the Data Toolkit opchar generator, and all example opchar CSVs. Add param assertions to the stor and hybrid unit tests and a new example, test_w_storage_w_reserves_setpoint_duration (opchar subscenario 50, 4-hour requirement on hourly timepoints), in which both energy constraints bind.
anamileva
force-pushed
the
am/stor-reserves-setpoint-duration
branch
from
September 4, 2026 21:19
98d5ad0 to
768a762
Compare
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
Adds an optional per-project opchar column,
reserves_setpoint_duration_hours: the number of hours a storage project must be able to sustain its new setpoint if its reserves are called. It replaces the hardcoded timepoint duration on the reserves side of thestorheadroom/footroom energy constraints and thegen_var_stor_hybheadroom energy constraint (resolving the first TODO instor.py). When the column is not specified, the timepoint duration is used, so existing scenarios are unchanged. The net charge/discharge energy on the right-hand side still uses the timepoint duration; the second TODO (deployment timing within the timepoint) is left in place.The "not specified" fallback is a Param with no default plus a sparse membership check in the rule, so no sentinel value is needed and 0 hours remains a legal input.
Plumbing
db_schema.sqlcolumn oninputs_project_operational_chars(appended afterupward_reserves_to_soc_depletion)gridpath/project/operations/__init__.py(inputs SQL,projects.tabwriter, validation) andget_optype_inputs_from_dbopchar_param_requirements.csvrow (optional forstorandgen_var_stor_hyb)eia860_to_project_opchar_input_csvs.py)projects.tabfiles and the opchar-matrix graphicsTesting
test_stor.pyandtest_gen_var_stor_hyb.py(fixtureprojects.tabgained the column)test_w_storage_w_reserves_setpoint_duration(opchar subscenario 50: Battery gets a 4-hour requirement on hourly timepoints). Both energy constraints bind; objective -280,939,051.47 vs the unchanged basetest_w_storageat -237,985,313.80