a dalsi oprava
This commit is contained in:
@@ -1002,6 +1002,21 @@ begin
|
||||
where wk.sell_price < 0
|
||||
and wk.pv_surplus_w > 0;
|
||||
|
||||
-- v45: v sell<0 okně neg dne — grid nabíjení při kladném buy (prep), i bez pv_surplus (ranní 07:45).
|
||||
if v_first_neg_sell_ord is not null and v_first_neg_prague_date is not null then
|
||||
update _ems_plan_slot_wk wk
|
||||
set allow_charge = true,
|
||||
allow_grid_charge = true,
|
||||
grid_charge_suppressed_reason = coalesce(
|
||||
wk.grid_charge_suppressed_reason,
|
||||
'neg_window_grid_charge'
|
||||
)
|
||||
where wk.slot_ord >= v_first_neg_sell_ord
|
||||
and wk.sell_price < 0
|
||||
and wk.buy_price >= 0
|
||||
and (wk.interval_start at time zone 'Europe/Prague')::date = v_first_neg_prague_date;
|
||||
end if;
|
||||
|
||||
-- Acquisition: grid nabíjení před prvním exportem ve STEJNÝ den jako záporné výkupní okno
|
||||
-- (ne dřívější večerní export v horizontu rolling replanu).
|
||||
select min(wk.interval_start)
|
||||
|
||||
Reference in New Issue
Block a user