Conversation
…nalytical-validation-framework-and-elasticity-sensitivity-analysis
Implements utils/post/diagnose_demand_flex.py: an analytical diagnostic that loads real HP building loads and TOU derivation data to sweep candidate elasticity values (-0.02 to -0.20), compute peak reduction % and rate-arbitrage savings per HP building, and recommend the elasticity that best matches the Arcturus 2.0 "no enabling technology" empirical target for each NY utility. Runs in ~15s per utility without requiring a CAIRO run. Made-with: Cursor
Implements utils/post/validate_demand_flex_shift.py: reproduces the constant-elasticity demand-response shift analytically using the same functions CAIRO uses, then verifies correctness via three checks: energy conservation (per-building kWh preserved), direction (peak kWh decreases, off-peak increases), and cross-check against CAIRO's saved demand_flex_elasticity_tracker.csv. All 7 NY utilities pass at ε=-0.10. Produces five diagnostic plots per utility: aggregate daily load profile (pre/post with shaded fill), net shift by hour bars, month×hour heatmap, per-building peak reduction distribution, and per-building daily profiles at representative consumption percentiles. Also writes CSV/parquet data outputs for report reuse. Made-with: Cursor
context/methods/tou_and_rates/demand_flex_elasticity_calibration.md: accessible writeup of the per-utility elasticity calibration methodology, Arcturus 2.0 empirical anchor, two savings mechanisms (rate arbitrage vs RR reduction), results table (ε=-0.10 or -0.12 per utility), and known limitations. context/plans/demand-flex_elasticity_calibration.md: living plan document for the broader demand-flex calibration and validation work. Made-with: Cursor
rate_design/hp_rates/ny/Justfile: add validate-demand-flex, validate-demand-flex-all, and diagnose-demand-flex recipes for running the shift validation and elasticity sweep diagnostic from the command line. context/README.md: index the new demand_flex_elasticity_calibration.md context document. Made-with: Cursor
5 tasks
context/methods/tou_and_rates/demand_flex_elasticity_calibration.md: - Add Validation section: all-utilities pass results at ε=-0.10 (energy conservation, direction, CAIRO tracker cross-check) - Add per-utility peak reduction table at ε=-0.10 - Document the five diagnostic plot types and what they show - Add invoke instructions for the new Justfile recipes context/plans/demand-flex_elasticity_calibration.md: - Update todos to reflect Phase 1 completion (diagnostic script, validation script, Justfile recipes, results review all done) - Add status table at the top of the plan body - Add pending items: scenario YAML update, optional Phase 2 sweep Made-with: Cursor
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.
Implements the analytical demand-flex validation and elasticity calibration framework for NY HP rate design, grounded in the Arcturus 2.0 meta-analysis.
What this PR adds
utils/post/diagnose_demand_flex.py— Elasticity sweep diagnostic. For each NY utility, loads real HP building loads and TOU derivation data, sweeps candidate elasticity values, and recommends the value whose peak reduction % most closely matches the Arcturus 2.0 "no enabling technology" empirical prediction. Runs in ~15s per utility without a CAIRO run.utils/post/validate_demand_flex_shift.py— Shift validation and diagnostic plots. Reproduces the constant-elasticity demand-response shift analytically using the same functions CAIRO uses, then verifies: (1) energy conservation, (2) correct direction (peak kWh down, off-peak up), (3) match against CAIRO's saveddemand_flex_elasticity_tracker.csv. All 7 NY utilities pass at ε=-0.10. Produces 5 diagnostic plots per utility (aggregate daily profile, net-shift-by-hour bars, month×hour heatmap, peak reduction distribution, per-building daily profiles) and CSV/parquet outputs for report reuse.context/methods/tou_and_rates/demand_flex_elasticity_calibration.md— Methodology writeup: Arcturus 2.0 anchor, two savings mechanisms (rate arbitrage vs RR reduction), per-utility results table (ε=-0.10 or -0.12), known limitations.rate_design/hp_rates/ny/Justfile— Three new recipes:validate-demand-flex,validate-demand-flex-all,diagnose-demand-flex.Reviewer focus
diagnose_demand_flex.pynormalizes by number of HP buildings (n_bldgs) not by weighted customer count — this is intentional and correct; see the savings decomposition in the context doc.Closes #377
Made with Cursor