tuning BA81
This commit is contained in:
9
db/migration/V062__planner_terminal_soc_value_factor.sql
Normal file
9
db/migration/V062__planner_terminal_soc_value_factor.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
alter table ems.asset_battery
|
||||
add column if not exists planner_terminal_soc_value_factor numeric not null default 0.9;
|
||||
|
||||
comment on column ems.asset_battery.planner_terminal_soc_value_factor is
|
||||
'Váha terminal SoC shadow price v LP solveru.
|
||||
0 = solver nemá motivaci držet energii v baterii na konci horizontu (agresivnější arbitráž / vybití).
|
||||
1 = odpovídá ~průměrné nákupní ceně (konzervativní držení energie).
|
||||
Používá se v backend/services/planning_engine.py (terminal_soc_kcz_per_wh).';
|
||||
|
||||
@@ -130,6 +130,13 @@ begin
|
||||
raise exception 'No site_grid_connection for site_id=%', p_site_id;
|
||||
end if;
|
||||
|
||||
-- LP tuning (battery-level): terminal SoC shadow price factor
|
||||
v_b := jsonb_set(
|
||||
v_b,
|
||||
'{planner_terminal_soc_value_factor}',
|
||||
to_jsonb(coalesce((v_b->>'planner_terminal_soc_value_factor')::numeric, 0.9))
|
||||
);
|
||||
|
||||
select coalesce(
|
||||
jsonb_agg(
|
||||
jsonb_build_object(
|
||||
|
||||
Reference in New Issue
Block a user