Draft
Conversation
Implements the full orchestration layer for fair-default rate runs: - **Justfile** (`rate_design/hp_rates/Justfile`): new FAIR-DEFAULT section with `path_scenarios_fair_default` vars, `create-fair-default-scenario-yamls`, `prepare-fair-default-tariffs`, `run-fd` dispatcher, `run-scenario-from` (alternate-YAML dispatch), `run-101`–`run-124` wrappers, `all-pre-fair-rate`, and `fair-default-rate-runs` end-to-end recipe. - **`utils/pre/create_fair_default_scenario_yamls.py`**: generates per-utility fair-default scenario YAMLs (24 runs each: 6 subclass×strategy combos × 4 phases) from the baseline scenario YAML. - **`utils/mid/prepare_fair_default_tariffs.py`**: orchestrates computation of fair-default inputs and emission of 12 uncalibrated tariff JSONs per utility (delivery + supply for each of 6 subclass×strategy combos). - **`utils/pre/compute_tou.py`**: adds `compute_mc_seasonal_ratio` helper used by `prepare_fair_default_tariffs` for strategy C (fixed_plus_seasonal_mc). - **`utils/pre/validate_config.py`**: extends with `--fair-default-dir` arg and `_validate_fair_default_dir` that checks every run's `fair_default:` block for required keys and valid `strategy` enum values. - **`rate_design/hp_rates/ny/config/scenarios/fair_default/scenarios_nyseg.yaml`**: hand-authored reference YAML for nyseg (all 24 runs 101–124). - Tests: `tests/test_compute_tou.py` for `compute_mc_seasonal_ratio`; minor formatting fixes in `tests/test_compute_fair_default_inputs.py` and `utils/mid/compute_fair_default_inputs.py`.
Use Timestamp month/hour via explicit conversion so ty resolves types; DatetimeIndex stubs omit .month/.hour.
- prepare_fair_default_tariffs: broader fair-default flow and inputs handling - validate_config / write_tariff_maps_from_scenario: align with new scenario shapes - loads: support fair-default load paths - tests: cover fair-default input computation edge cases - Justfile: recipes or paths for fair-default runs
Scenarios for CenHud, ConEd, NiMo, NYSEG/OR, and RGE under config/scenarios/fair_default/.
Updated fair-default-aligned gas tariff map CSVs for NYSEG territories.
Generated tariff_map CSVs for CenHud, ConEd, NiMo, NYSEG, OR, and RGE covering eheat/hp default variants (fixed, seasonal, supply, MC, calibrated).
Includes nyseg eheat/hp default tariff JSON variants and .fair_default_inputs/ CSV inputs used by fair-default prep.
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.
Overview
Implements the fair default rate design modules described in issue #398. This PR introduces closed-form math to design a single residential default tariff that eliminates the HP cross-subsidy$X_S$ (measured from BAT run outputs) while preserving the class revenue requirement (RR).
Three strategies are provided:
Deliverables
utils/mid/compute_fair_default_inputs.py— computeutils/mid/create_fair_default_tariff.py— produce URDB tariff JSON from inputs CSV and chosen strategy.rate_design/hp_rates/Justfile— two new shared recipes (compute-fair-default-inputs,create-fair-default-tariff) plus run-25/26 wiring.context/methods/tou_and_rates/fair_default_rate_design.md— methodology doc with derivations, uniqueness theorem, feasibility region, and worked RIE example.tests/utils/mid/test_compute_fair_default_inputs.py— unit and round-trip tests.Closes #398