Skip to content

Pin Energyplan 0.4.0 - #1189

Merged
frahlg merged 2 commits into
masterfrom
pin-energyplan-0.4.0
Sep 9, 2026
Merged

frahlg merged 2 commits into
masterfrom
pin-energyplan-0.4.0

Conversation

@frahlg

@frahlg frahlg commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

Pin compiled Energyplan 0.4.0 from private source 467aa1e (https://github.com/srcfl/energyplan/pull/11, plus #9 and #10).

The worker keeps a proven incumbent when a later dual or MIP step fails, reports Feasible instead of Optimal when the search did not close, and stays alive on hostile protocol input.

Planner wire:

  • Slot and settings prices go as price_per_kwh / spot_per_kwh / export_price_per_kwh (same minor units as before, not öre field names).
  • When price.demand_price_per_kw is set, Core expands local weekday 06–20 clock hours, including DST, applies VAT, and attaches already_kw from this month's measured import. Empty keeps planning unchanged.

FTW contains only the compiled Linux ARM64/AMD64 and macOS ARM64 workers plus public integration metadata.

Validation:

  • python3 scripts/package.py --output dist/0.4.0-full on macOS (all three platforms)
  • Darwin handshake: version 0.4.0, features champion, forecast_reset, partial_slots, demand_charges
  • FTW make native-solver-test and make verify

Note

Medium Risk
Changes the external planner protocol and adds tariff logic that directly steers MPC optimization; misconfiguration or history gaps could skew plans, though zero demand price preserves prior behavior.

Overview
Pins Energyplan 0.4.0 and updates the planner JSON contract so slot and export prices use neutral keys (price_per_kwh, spot_per_kwh, etc.) instead of öre-specific names—same minor currency units as before.

When price.demand_price_per_kw is set (optional demand_top_n, default 3), Core builds weekday 06–20 local peak-power tariffs for the planning horizon: DST-aware clock hours, VAT on the wire price, already_kw from measured import history (ImportWhIntervals on grid history), and partial elapsed_import_kwh for in-progress hours. Empty/zero demand config leaves behavior unchanged. Demand charges are attached to replans, require the solver demand_charges feature, and bump Energyplan to the fleet time budget when present.

Config validation, example YAML, Settings → Price fields, and MPC hot-reload (demand + timezone) round out operator wiring.

Reviewed by Cursor Bugbot for commit 5d77fa5. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f95ac1d4-567f-4ecf-a84e-e8ce4e6e0c44)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-09T07:18:16.754491Z a1ad4e8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_3769260a-4a33-4605-bbf2-67c3f6da3203)

@frahlg
frahlg merged commit 9f4b6b9 into master Sep 9, 2026
19 checks passed
@frahlg
frahlg deleted the pin-energyplan-0.4.0 branch September 9, 2026 07:47
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.

1 participant