Repository navigation
WP4: evidence scripts - timer baseline, constrained site, forecast, fit, multi-day - #12
Merged
Merged
Conversation
…ast, fit, multi-day - prove.py: --policy timer (full power 09-14, else 6 A) prints the LP's delta over a wall-clock timer: CO2 -56.2 %, bill -28.5 %, peak -28.4 %; the timer leaves 31 kWh short and bursts the block ($32.88/day). --block/--feed overrides print block overage $, kWh short and what the full rung (static share) would draw. At feed 80 / block 50: CO2 -23 %, bill +7.4 % (deferred energy lands in the 16-21 h price peak) - the carbon-vs-tariff conflict, reported as measured. --forecast <file> plans on it and scores on data/signal.json, printing mean |forecast - actual|. Every run prints clean-hour share (metrics §3) and stated-vs-actual departures (29/36 later, 5 earlier). - fetch_data.py signal --forecast -> data/signal_forecast.json from /v3/forecast/historical (06:00 issue); signal also stores health_damage ($/MWh) when served. Not run here: no WattTime credentials. - scheduler.impact(..., health=True) adds health_usd (None without an index); impact_detail carries it. One test. - scripts/fit.py: cash tiers | perks only | not a fit from stated slack, tariff spread, demand charge and --saving-rate. Caltech: perks only (slack median 3.8 h; 4 / 15 / 17 = solutions.md Fact 1). - scripts/replay_days.py: range over data/days/<date>.json; names missing days. Only the committed day exists on disk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017thvbGo7rTVnG2f46cLMzU
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.
WP4 of
prompt.md— scripts only (solutions.md§0, §4, §6;ROADMAP.md§5). Plan:.docs/implementation-plan.md(deviation 9).The numbers this PR puts on record (real day,
python scripts/prove.py --policy timer)The judge's kill question, answered: over a wall-clock timer the LP is −56 % CO₂, −28 % bill, −28 % peak, and the timer leaves 31 kWh undelivered while bursting the block. Stated-vs-actual departures: 29/36 left later than they said, 5 earlier (worst −158 min) — drivers under-state, they don't game.
Constrained site (
--block 50 --feed 80): the feed binds all day, both policies peak at the 40 kW of headroom; Noonshift −23 % CO₂ with less shortfall (12.5 vs 14.6 kWh) but the bill is +7.4 % — deferred energy lands in the 16–21 h price peak. That is the carbon-vs-tariff conflict (ROADMAP§6.9, per-siteW_CARBON), reported as measured, not hidden. The full rung there would sit at 60 × 0.667 kW = 40 kW.What changed
prove.py:--policy timer,--block/--feed,--forecast <file>(plans on it, scores ondata/signal.json, prints mean |forecast − actual|); every run prints clean-hour share (metrics.md§3), block overage $, kWh short, stated-vs-actual. Gate unchanged.fetch_data.py signal --forecast→data/signal_forecast.jsonfrom/v3/forecast/historical(the 06:00 issue,horizon_hours=24);signalalso storeshealth_damage($/MWh) when the plan serves it. Not run here — no WattTime credentials on this machine. If Basic does not serve historical forecasts, the flag works on a live day via the same code path with/v3/forecast.scheduler.impact(..., health=True)→health_usd(None without an index), keyword-only;impact_detailcarries it. One unit test.scripts/fit.py:cash tiers | perks only | not a fitfrom stated-slack median, tariff spread, demand charge, and--saving-rate(whatprove.pymeasured — the slack rule alone would call Caltech "cash tiers"; 0.6 ¢/kWh measured makes it perks only, matchingmetrics.md§6b). Caltech stated slack median 3.8 h, distribution 4 / 15 / 17 =solutions.mdFact 1.scripts/replay_days.py --days …: min/median/max overdata/days/<date>.json; names missing days. Only the committed day is on disk, so the range still needs signal files (fetch_data.py signal --day …).70 tests pass; CI runs
prove.pyas before.🤖 Generated with Claude Code
https://claude.ai/code/session_017thvbGo7rTVnG2f46cLMzU