fix solar sell pri male zaporne cene
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-05-01 10:38:40 +02:00
parent 6743224cc5
commit e686bc1d2c
8 changed files with 89 additions and 7 deletions

View File

@@ -0,0 +1,13 @@
-- Tvrdý zákaz grid exportu při záporné efektivní prodejní ceně v LP (odděleně od GEN cut-off přepínače na invertoru).
alter table ems.site_grid_connection
add column if not exists block_export_on_negative_sell boolean not null default false;
comment on column ems.site_grid_connection.block_export_on_negative_sell is
'LP (solve_dispatch): při effective sell < 0 vynutit ge[t]=0. Nezávislé na deye_gen_microinverter_cutoff_enabled. Zapínat jen u lokalit bez nutnosti vést přebytek neriťitelného PV pole B do sítě (jinak hrozí infeasible); př. KV1 vs home-01.';
update ems.site_grid_connection sgc
set block_export_on_negative_sell = true
from ems.site s
where sgc.site_id = s.id
and s.code = 'KV1';