mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-12-02 18:36:28 +01:00
Additional changes - Add the optimizer terms to the glossary. - Point to the skill from AGENTS.md, docs/develop/ai.md and the energy-domain skill. - Match module names case-exactly, also on case-insensitive file systems. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Claude Code (claude-opus-5-5)
28 lines
1.8 KiB
Markdown
28 lines
1.8 KiB
Markdown
# Optimizer API, visualization and wizard steps get no exception
|
|
|
|
An optimizer owns its REST endpoints, its visualization and its EOSdash wizard steps
|
|
([0005](0005-optimizers-plug-in-through-one-registry.md)), and all three read configuration or EMS
|
|
state today. None of them gets an exception from
|
|
[0003](0003-optimizers-see-only-their-optimization-parameters.md):
|
|
|
|
- The visualization (`<name>visualize.py`) is part of the solution conversion and renders from the
|
|
optimization parameters and the optimization result only.
|
|
- The REST router (`<name>api.py`) never fetches anything itself. It declares placeholder
|
|
dependency functions for what it needs: the optimizer's last optimization parameters and result,
|
|
kept by the energy management, and the call that starts a run. The generic server fills them in
|
|
through FastAPI's `app.dependency_overrides`, using the registry. The router may import FastAPI,
|
|
Pydantic and its own optimization request, never configuration, EMS state or the server
|
|
(`akkudoktoreos.server`). No other part of the optimizer, its parameter preparation included,
|
|
imports the server either.
|
|
- Wizard steps are not code. They are metadata on the fields of `<name>settings.py` (which fields
|
|
the wizard asks for, and in which order), which EOSdash reads; an optimizer contains no EOSdash
|
|
code.
|
|
|
|
## Considered Options
|
|
|
|
- **An "integration" role that may read configuration and EMS state**: rejected. It would become
|
|
the place where optimizer code quietly reaches the outside world again, and removing an
|
|
optimizer would still mean finding its integration code in the server and EOSdash.
|
|
- **The router imports its dependency functions from the server**: rejected. The optimizer would
|
|
depend on the server, and a server helper is an easy way back to the configuration.
|