Repository navigation
Conversation
…e (WP4) Template-driven price adapter (action or attribute source, list or mapping shape, per-MWh conversion, native 15/60-minute grid from the data, gaps as None, DST safe), templates for Tibber, Nord Pool, ENTSO-E, EPEX Spot, Octopus Energy and a generic price list, fixed and HT/NT sources, the price formula on spot-only sources, export fixed/tiered/none, the region's negative-price rule, and a TariffService that keeps the prices fresh, stores them in timeseries.db and serves them on GET /api/v1/prices. The simulator answers tibber.get_prices through the same template path; new scenario negative_prices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…es (review M1-M3) M1: a failed fetch consumes the dirty flag and a change triggers at most one attribute fetch per 30 s, so a failing attribute source no longer refetches on every poll. M2: a fetch without any known price is a failure; unknown slots of a fetch are filled from the earlier data and reported as quality.carried_slots. M3: the old tail starts at the next whole old slot (no overlap when the grids differ); the series assembly for storing runs inside the try block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
… list-end gaps (review M4, m2, m4) M4: pynordpool/HA source show that `date` is the CET delivery day (deliveryDateCET); the template gets the additive `date_tz` field (schema changelog), request dates are computed in that zone and the "tomorrow covered" test uses the market's end of day, so it terminates west of CET too. Research note with repo@sha paths in docs/research/integrations.md. m2: a source in another currency than the region (sensor unit, template unit, `currency` action field) raises CurrencyMismatchError (en/de key). m4: core/series.py segments_from_points (4-A code): at the end of a list a gap that is a multiple of the running step is a gap (None), not a resolution change; the rhythm needs a confirming distance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…its (review m1, m3, m5, n1-n5) m1: system check warns about a spot-only import price without a price formula; PriceReport carries price_includes and formula_missing; PUT /config/tariff rejects a missing required request field of the template (422, en/de key); STATUS records that the 4-F planner must refuse spot_only prices without a formula. m3: the three tariff settings are documented as expert environment variables in both app DOCS.md files (no app options); plan question wording fixed. m5: plan question on the per-plant opt-out of the section 51 EEG rule (commissioning date). n1: architecture table and diagram: tariff no longer depends on ha. n2: EPEX market template text. n3: ambiguous-series names are joined before ICU. n4: adapters docstring. n5: tests use end_price, apply is marked as a deprecated alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Resolves runtime.stop (tariff task joins the storage tasks that are awaited after the devices are released) and STATUS; the fake-price test uses rate-limit sub-keys now that the fake is rate limited like the real connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
The planner needs prices (4-C) and forecasts (4-D/4-E); both sides are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…tests (WP8, part 1) HiGHS LP behind a SolverBackend protocol, pure PlannerInputs builder, rule-based fallback with the same schedule shape, interval explanations, additive plan v2 fields (BatteryBand.grid_charge_max_w/discharge_lock, IntervalFlows.devices_w/ curtail_w) and planner scenarios of the virtual house. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…anations (WP8) Scenario tests, rolling replay with a too optimistic forecast, the device budget on PV at the risk quantile, fallback-chain tests with fake backends, the reference-house benchmark (scripts/bench_planner.py, slow test < 3 s) and the contract tests for the additive plan v2 fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…numbers Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Snapshot so nothing is lost when the usage limit stops the session; not yet checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…controller (WP9) PlanningService (suncore/app/planning.py): quarter-hour cadence plus events (prices, forecasts, deviation, configuration, override, manual replan), debounce, single flight, solve in a daemon thread with budget and warm start, plan snapshots, last good plan kept on failure, stale after 2 h and Plan.default() for the controller. Controller: priority_until_soc_pct is judged against the live SoC, a battery band applies only while a plan interval covers now. API: GET /api/v1/plan, GET /api/v1/plan/status, POST /api/v1/plan/replan, live message "plan". Demo and scenario planner_in_shadow run the planner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
… flapping-band and shadow tests (review D1, cs m1, m4) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…rid charging without a price, curtail in negative-rule slots, early-charge tie-breaker, band hysteresis (review D2-D4, B1, M3, m1-m6, n2, cs m2/m5/m6) - grid charging needs a known price (flat mode included); property generator covers flat mode - export where the negative-price rule zeroed the export price costs more than curtailment - device budget: battery-first day on P50 plus the PV overflow it cannot absorb - PV charging tie-breaker falling over the horizon (part of objective()) - numpy declared; full evening target due at the start of the evening deficit - morning-buffer reason names the reachable SoC, priority only until the buffer's slot - no load forecast: flat 500 W (or a passed recent mean) and no devices, with a reason - IntervalPrices.estimated for median stand-ins, never cited in hold_for_price - violations() checks the flow split and the import limit - heuristic battery-first window equals the LP's; tight hysteresis against the previous plan - no planner battery: PlanInterval.battery is None (goal rules stay in charge) - GIL test: HiGHS releases it while solving (slow test) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…m the hand-over (review m8, n3) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
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.
Gestapelt auf #30 (PR 4-E). Zusätzlich ist #27 (PR 4-C, Tarife) hineingemergt, weil der Planer Preise braucht. Die Basis wird nach dem Merge der Vorgänger umgestellt.
Was
WP8 – Planer (
suncore/planner/, importiert nurcore, mypy --strict):build_inputs: Aus Preisen, Prognosen, Risikozielen, Akku, Grenzen und Geräten wird ein unveränderliches Eingabeobjekt (15 min, jetzt bis +48 h).spot_onlyohne Formel und fehlende Preise führen in den Modus „flat“ (nur Autarkie), jeweils mit Begründung.highspy1.15.1, NumPy 2.5.4):effective_reserve_pct, Import- und Exportgrenze.planner.*, en/de).BatteryBand/DeviceBandje Intervall nach ADR-0013, inkl.priority_until_soc_pct,discharge_lockundgrid_charge_max_w(bis 4-G nur Vorbereitung).scripts/bench_planner.pymit dem Referenzhaus des Maintainers.WP9 – Laufzeit (
suncore/app/planning.py):Plan.default(), also das Verhalten aus Phase 3.priority_until_soc_pctwird in jedem Takt gegen den gemessenen SoC geprüft.goals.battery_targetbleibt eine Untergrenze: Unter dem Ziel hat der Akku Vorrang, egal was der Plan sagt.GET /api/v1/plan(Plan mit Flüssen, Preisen, Bändern, Begründungen, Status)GET /api/v1/plan/statusPOST /api/v1/plan/replan(202)planWarum
Das ist das Herzstück von Phase 4: ein Fahrplan mit Akku-Strategie und „Warum?“ (BRIEF §4.8, Plan §0).
Wie getestet
./scripts/check.shgrün: 4353 Python-Tests, 219 Frontend-Tests. markdownlint ohne Fehler.Hypothesis-Tests, jeweils für Solver und Heuristik:
Neun Szenarien:
prefer_fullRegler:
max(Priorität, Nutzerziel)bekommen Verbraucher nie mehr als ohne Plan.Szenario
planner_in_shadow(6 h mit echtem Planer): Es wird nichts geschrieben, keineBatteryAction, undcontroller.plan_blockedtaucht als „hätte“-Grund auf.Laufzeit:
Rechenzeit Referenzhaus (17 kWp Ost-West, 29,6 kWh, Tibber, 13,5 kW Exportgrenze, 2 Klimageräte; 193 Slots, 2318 Variablen, 0 Binärvariablen): Solve ≈ 4–5 ms, ganzer Lauf ≈ 25–35 ms (amd64).
Risiken
UNVERIFIED). Das Budget beträgt 8 s; das gemessene Ergebnis liegt bei Millisekunden.highspyundnumpy: musllinux-Wheels für aarch64 und x86_64 sind vorhanden, das Image wird größer. Der Speichertest im Smoke-Test bleibt bestehen.Safety-Review
control-safety: freigegeben nach Behebung von M1 (Commit 5349b3b).
apply()wird nur aussafety/aufgerufen.allowed=False/max_power_wsenken die Obergrenze,prefer_onerzwingt nichts). Erzwungenes Herunterschalten respektiert Mindestlaufzeit, Mindestpause und Schaltspiele pro Stunde.BatteryAction. Das Gate lehnt sie auch mit Plan weiter ab.goals.battery_targetals Untergrenze; dazu gibt es einen Property-Test.BatteryAction, GIL-Test, kein Band ohne Akku-Modell.Checkliste
enunddearchitecture.md, Experten-Umgebungsvariablen inDOCS.md)docs/STATUS.mdaktualisiertUNVERIFIEDOffene Fragen an den Maintainer
Ohne Antwort gilt jeweils der Standard.
de): abregeln statt mit 0 vergütet einspeisen. Das Abregeln ist bis Phase 6 nur informativ. Standard: so lassen.POST /plan/replanbekommt keine eigene Admin-Berechtigung, nur den Peer-Check wie die anderen ändernden Routen. Standard: so lassen.UNVERIFIED: Rechenzeit und GIL-Freigabe auf aarch64; Abweichungsschwellen.Generated by Claude Code