Branch 5: dynamický terminal SoC factor při future neg buy
This commit is contained in:
@@ -24,6 +24,22 @@ Formát: **datum (ISO)** · stručný důvod · soubory · chování / ověřen
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-06 — Dynamický terminal SoC factor při future neg buy (v65, Branch 5)
|
||||
|
||||
**Problém:** Binární × **0,1** při **`future_neg_buy_discharge`** (v64) neškáloval s vzdáleností a záporností **`buy<0`**; **`planner_terminal_soc_value_factor = 0.9`** na home-01 držel baterii i když v horizontu bylo levnější nabíjení.
|
||||
|
||||
**Změna (v65):**
|
||||
- **`terminal_neg_buy_weight`** (`w_neg`): `effective_factor = planner_terminal_soc_value_factor × (1 − w_neg)`; `w_neg` roste s blízkostí prvního **`buy<0`** (horizont 36 h) a magnitudou záporné ceny (ref 1 Kč/kWh).
|
||||
- Odstraněn pevný **`FUTURE_NEG_BUY_TERMINAL_SOC_FACTOR_MULT`**; váha platí vždy, když je v horizontu **`buy<0`**, ne jen při **`future_neg_buy_discharge`**.
|
||||
|
||||
**Soubory:** `backend/services/planning_engine.py`, `backend/tests/test_planning_dispatch_milp.py`.
|
||||
|
||||
**Ověření:**
|
||||
- `pytest backend/tests/test_planning_dispatch_milp.py -k "terminal_soc or terminal_neg_buy"`
|
||||
- MCP: `solver_params->'inputs'->>'terminal_neg_buy_weight'` > 0 před dnem s **`buy<0`**; `terminal_soc_factor_effective` < `planner_terminal_soc_value_factor`.
|
||||
|
||||
---
|
||||
|
||||
## 2026-06-06 — Future neg-buy večerní export (v64, Branch 2)
|
||||
|
||||
**Problém:** home-01 run 23784 při **`relaxed_neg_prep_window`**: `evening_push_hard_suppressed`, prázdné **`neg_evening_push_slots`**, **`pos_sell_pre_neg_buy_ts`** blokoval `ge_bat` ve večerní špičce, terminal SoC shadow price držel ~80 % SoC + import @ ~5 Kč.
|
||||
@@ -32,7 +48,7 @@ Formát: **datum (ISO)** · stručný důvod · soubory · chování / ověřen
|
||||
- **`future_neg_buy_discharge`**: před dnem s **`buy<0`**, pokud FVE v **`sell<0`** pokryje deficit do prep rampy, zůstává neg-evening bundle (push + kotvy **`reserve_soc`**) i při **`relaxed_neg_prep_window`** (strict pre-neg PV export bundle se vypne).
|
||||
- **`evening_push_hard_suppressed`** jen při **`neg_sell_phases_fallback`**, ne při **`relaxed_neg_prep_window`**.
|
||||
- **`pos_sell_pre_neg_buy_ge_exempt_slots`**: večerní peak před **`buy<0`** nesmí dostat `ge=0`, pokud je vývoz ekonomicky výhodný.
|
||||
- **`terminal_soc_factor_effective`**: při **`future_neg_buy_discharge`** násobit **`planner_terminal_soc_value_factor`** × **0,1**.
|
||||
- **`terminal_soc_factor_effective`**: v64 binární × **0,1** při **`future_neg_buy_discharge`** — nahrazeno v65 dynamickým **`terminal_neg_buy_weight`** (viz výše).
|
||||
|
||||
**Soubory:** `backend/services/planning_engine.py`, `backend/tests/test_planning_dispatch_milp.py`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user