fix lock charge on 100% SOC
Some checks failed
CI and deploy / migration-check (push) Failing after 14s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-04-29 15:27:54 +02:00
parent 6074535d96
commit efc6e54f0e
2 changed files with 17 additions and 1 deletions

View File

@@ -346,7 +346,9 @@ begin
if v_charge_buf <= 0 then
update _ems_plan_slot_wk wk set allow_charge = true;
elsif v_energy_to_fill <= 0 then
update _ems_plan_slot_wk wk set allow_charge = false;
-- Pokud rolling replan startuje s baterií plnou, nechceme zablokovat budoucí nabíjení po vybití.
-- Povolit alespoň nabíjení v PV surplus slotech, aby solver mohl vytvořit headroom a pak ho znovu zaplnit z FVE.
update _ems_plan_slot_wk wk set allow_charge = (wk.pv_surplus_w > 0);
else
update _ems_plan_slot_wk wk set allow_charge = (wk.pv_surplus_w > 0);
v_cum := 0;