-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
What
The TOU derivation script (utils/pre/compute_tou.py) currently computes demand-weighted average MCs per season, then rescales them so the load-weighted mean equals a base_rate from a calibrated flat tariff (from runs 1 and 2). This discards the MC absolute level and anchors to a reference tariff, creating unnecessary upstream dependencies:
run-9→ needsrun-1to getnyseg_flat_calibrated.jsonas the base rate anchorrun-10→ needsrun-2to getnyseg_flat_supply_calibrated.jsonas the base rate anchor
Why
Since CAIRO's precalc recalibrates the absolute level anyway, rescaling to a reference tariff base rate is unnecessary. Eliminating this dependency lets TOU tariffs be generated entirely in all-pre, decouples runs 9 and 10 from runs 1 and 2, and makes the rate derivation more semantically correct (rates reflect actual MC; precalc calibrates revenue neutrality).
How
utils/pre/compute_tou.py— Removebase_rateparameter fromcompute_seasonal_base_rates; return raw demand-weighted average MCs directly (no rescaling).utils/pre/derive_seasonal_tou.py— Removetou_base_rateparameter fromderive_seasonal_tou(); update the call tocompute_seasonal_base_rates; remove--tou-base-rateCLI arg; keep--reference-tariffbut use it only forfixedchargefirstmeter(not base rate); remove thetou_base_rate is Nonevalidation guard.rate_design/hp_rates/Justfile— Addcreate-tou-tariffsrecipe that runs aftercreate-flat-tariffsand updateall-preaccordingly; simplifyrun-9andrun-10to just callrun-scenario.utils/Justfile— Updatecreate-seasonal-tourecipe description to reflect the new role of--reference-tariff.tests/test_derive_seasonal_tou.py— Removetou_base_rate=0.1fromderive_seasonal_tou()call.context/code/marginal_costs/compute_tou_from_marginal_costs.md— Update to reflect that rates are output directly from MC without rescaling.
Deliverables
- PR merging the changes above
- Runs 9 and 10 pass without relying on run-1/run-2 outputs
just checkandjust testpass
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels