posun dovybiti tesnep red zapornou cenu
Some checks failed
CI and deploy / migration-check (push) Failing after 11s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-26 01:30:28 +02:00
parent b1e124416d
commit 0edf9226cb
4 changed files with 138 additions and 7 deletions

View File

@@ -0,0 +1,12 @@
-- Plánovač: zpoždění hluboké relaxace SoC až do okna před prvním extrémně záporným nákupem (15min sloty).
ALTER TABLE ems.asset_battery
ADD COLUMN IF NOT EXISTS planner_discharge_relax_prewindow_slots integer;
COMMENT ON COLUMN ems.asset_battery.planner_discharge_relax_prewindow_slots IS
'Počet 15min slotů před prvním buy <= planner_extreme_buy_threshold, ve kterých už platí hluboký planner floor; '
'dál v čase drží LP spodek na rezervě (arb). NULL = 8 (2 h).';
UPDATE ems.asset_battery
SET planner_discharge_relax_prewindow_slots = 8
WHERE planner_discharge_relax_prewindow_slots IS NULL;

View File

@@ -41,6 +41,7 @@ begin
)::numeric,
'planner_extreme_buy_threshold_czk_kwh', coalesce(ab.planner_extreme_buy_threshold_czk_kwh, -5.0),
'planner_discharge_floor_percent', ab.planner_discharge_floor_percent,
'planner_discharge_relax_prewindow_slots', coalesce(ab.planner_discharge_relax_prewindow_slots, 8),
'charge_efficiency', ab.charge_efficiency,
'discharge_efficiency', ab.discharge_efficiency,
'degradation_cost_czk_kwh', ab.degradation_cost_czk_kwh,