Skip to content

Add fair-default rate design pipeline for NY#418

Open
sherryzuo wants to merge 1 commit into
mainfrom
fair-default-rate-design
Open

Add fair-default rate design pipeline for NY#418
sherryzuo wants to merge 1 commit into
mainfrom
fair-default-rate-design

Conversation

@sherryzuo
Copy link
Copy Markdown
Collaborator

Summary

This PR delivers the full fair-default rate design pipeline for NY — the modules, configs, tariff artifacts, tests, and orchestration scaffolding needed to run the three closed-form fair-default strategies (A: fixed_charge_only, B: seasonal_rates_only, C: fixed_plus_seasonal_mc) across all six NY utilities.

Key deliverables:

  • utils/mid/compute_fair_default_inputs.py — computes class and HP subclass aggregate inputs (kWh by season, bills, cross-subsidy) from CAIRO baseline outputs
  • utils/mid/create_fair_default_tariff.py — closed-form solver for strategies A/B/C via Cramer's rule; returns a modified URDB tariff JSON
  • utils/mid/prepare_fair_default_tariffs.py — orchestration layer that runs strategies across all utilities in a batch
  • utils/pre/create_fair_default_scenario_yamls.py — generates per-utility fair-default scenario YAMLs (runs 101–124)
  • Generalised feasible-line geometry: revenue-sufficiency and cross-subsidy-zero lines in (F, r_sum) space, including revenue-sufficient line for arbitrary seasonal rate combos and cross-subsidy calcs across all seasonal rate combinations
  • NY fair-default tariff configs: URDB JSONs, tariff maps, scenario YAMLs, and calibrated tariff JSONs for all six NY utilities (CenHud, ConEd, NIMO, NYSEG, O&R, RGE)
  • utils/pre/compute_tou.py — demand-weighted rho_MC input for strategy C
  • Extended validate_config.py to require bulk_tx entry in marginal-cost configs
  • Context doc: context/methods/tou_and_rates/fair_default_rate_design.md — full math derivation, closed-form strategies, feasibility geometry
  • Tests: test_compute_fair_default_inputs.py, test_create_fair_default_tariff.py, test_compute_fair_default_feasible_line.py, test_compute_tou.py
  • .gitignore: added .tmp/ for local pytest basetemp
  • Removed utils/mid/plot_feasible_line.py (plotting migrated to reports2)

Closes #398

Reviewer focus

  • Strategy math: create_fair_default_tariff.py implements a 2×2 Cramer's-rule solve for each strategy — worth a close read to confirm the linear system is assembled correctly relative to the notation in context/methods/tou_and_rates/fair_default_rate_design.md.
  • Feasible-line generalisation: 1a57bfc and f7d9c02 extend the feasible-line computation to work across arbitrary seasonal rate combinations, not just the (F, r_sum) plane — verify the parameterisation matches the math doc.
  • Config artifacts: the NY utility URDB JSONs, tariff maps, and scenario YAMLs were hand-assembled and then validated by validate_config.py; spot-check NYSEG and RGE since they have the most complex gas/seasonal structures.

Non-obvious implementation details

  • Strategy C slaves the winter rate to the summer rate via rho_MC = kWh_win_hp / kWh_sum_hp (demand-weighted, not MC-weighted — see compute_tou.py), which keeps the seasonal differential cost-reflective without requiring a separate MC time-series input at tariff-solve time.
  • The prepare_fair_default_tariffs.py orchestration layer is intentionally thin: it calls compute_fair_default_inputscreate_fair_default_tariff per utility per strategy and writes calibrated JSONs back into config/tariffs/electric/, matching the same promotion pattern used by the seasonal-discount workflow.
  • Plotting of the feasible line was removed from this repo (commit ad6208c) because it lives in reports2's fair_default_feasible_line.qmd notebook — keeping visualisation out of the platform keeps the dependency boundary clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fair default rate design modules

1 participant