docs(optimization): record the lessons of the GENETIC0 migration

Additional changes
- Correct a stale GENETIC0 docstring.
- Count infinite readings and predictions as missing in the energy-domain rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
Bobby Noelte
2026-11-27 13:55:41 +01:00
co-authored by Claude Opus 5.5
parent 40d0fab9d2
commit 8c06245e8b
11 changed files with 145 additions and 19 deletions
@@ -20,4 +20,13 @@ requests are Pydantic models, and the settings models of the configuration stay
- An invalid optimization parameter set is a bug in parameter preparation, found by its tests,
not a validation error at run time.
- Replay files need an explicit (de)serialization of the dataclasses instead of Pydantic's.
- Replay files need an explicit (de)serialization of the dataclasses instead of Pydantic's; a
test asserts that the round trip is lossless.
- The simulation's device parameters are derived from the optimization request by pure functions
(no configuration, no clock, no change to the request), so a replay file may store the request
and derive them again. GENETIC0's home appliance still reads today's date there and writes a
default time window into the request; it is frozen.
- The optimization result is a frozen dataclass as well. Where public response models are built
from it, its values are normalised as those models validate them (NumPy arrays to lists, NaN to
`None`, the fields' number types), so the responses do not change when the result stops being
a Pydantic model.