Commit Graph
5 Commits
Author SHA1 Message Date
4693e1fa97 fix(genetic): keep a started home appliance run until the device reports it finished
A re-plan treated a running home appliance as not started. In its start
slot it could pick another start of equal cost and switch the appliance
off; after the start slot it could only plan a new complete run later; and
when no complete run fitted into the rest of the window, the DAILY cycle
was dropped and the running appliance got OFF.

The executor now reports the start of a planned run as UNIX seconds under
`<device_id>.run_started_at` (setting `run_started_measurement_key`) and 0
when the device reports the run as finished. The device decides when that
is, also before or after the configured duration. Until then the GENETIC
optimizer places the remaining energy from now on as fixed load,
independent of windows, deadline and genes, sends RUN, counts the run as a
cycle of its start day and plans further cycles after its end and gap. A
run past its duration keeps the current slot without extra energy; a start
more than two run durations ago, or an invalid value, is logged and
ignored.

Refs: #1548
Signed-off-by: SchaafAlexander <86607129+SchaafAlexander@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
2026-11-15 13:54:22 +01:00
0bf9f50b97 fix(genetic): plan the running slot only for the remaining time
A run within a slot (e.g. 10:45 with hourly slots) planned slot 0 as a
full slot, although the SoC is measured at the run time. Slot 0 now moves
only the remaining part of the slot energy: battery, EV and inverter
energy caps, SoC power limit tables and the slot's PV and load forecast
are scaled by first_slot_fraction; efficiency curves are read at the
power of that part. The plan's SoC headroom clamp of the AC charge factor
uses the same part, and the GENETIC result reports first_slot_fraction.
A run on a slot boundary is unchanged.

Additional changes
Pin GENETIC test start times to the full hour; their results now depend on seconds within the slot
Document first_slot_fraction for consumers of GENETIC results

Refs: #1543
Signed-off-by: SchaafAlexander <86607129+SchaafAlexander@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
2026-11-15 12:45:56 +01:00
AndreasandGitHub cab088f09b fix(planning): accept full SoC targets and clarify unlimited EV SoC age (#1407)
* fix(devices): allow charging targets equal to the maximum SoC

* test(planning): protect EV SoC without age limits
2026-10-14 15:46:41 +02:00
AndreasandGitHub 49ea062dc8 fix(genetic): allow optimization without fresh SoC (#1403) 2026-10-13 19:02:19 +02:00
AndreasandGitHub f5c6d2bc1e docs: explain energy planner upgrade and compatibility changes (#1331)
* docs: explain energy planner upgrade and compatibility changes

* docs: add upgrade guide to documentation navigation

* docs: resolve changelog upgrade link in generated site
2026-09-17 21:17:41 +02:00