ladime a ladime
This commit is contained in:
@@ -560,24 +560,6 @@ async def get_site_forecast_pv_slots_range_corrected(
|
||||
le=10_000,
|
||||
description="Ignorovat sloty s nízkou výrobou (W) při odhadu profilu",
|
||||
),
|
||||
top_n_days: int | None = Query(
|
||||
None,
|
||||
ge=1,
|
||||
le=120,
|
||||
description="Jen N nejlepších kalendářních dní (podle clear-ish skóre) pro delta profil; ostatní dny ztlumené",
|
||||
),
|
||||
non_top_day_factor: float | None = Query(
|
||||
None,
|
||||
ge=0.0,
|
||||
le=1.0,
|
||||
description="Násobek váhy pro dny mimo top N (default 0.02)",
|
||||
),
|
||||
day_weight_gamma: float | None = Query(
|
||||
None,
|
||||
ge=0.25,
|
||||
le=8.0,
|
||||
description="Exponent na denní váhu (>1 silněji preferuje jen velmi 'clear' dny)",
|
||||
),
|
||||
) -> dict[str, list[dict[str, Any]]]:
|
||||
if to_ts <= from_ts:
|
||||
raise HTTPException(status_code=422, detail="'to' must be after 'from'")
|
||||
@@ -589,8 +571,6 @@ async def get_site_forecast_pv_slots_range_corrected(
|
||||
now = datetime.now(tz=timezone.utc)
|
||||
delta_to = delta_to_ts or now
|
||||
delta_from = delta_from_ts or (delta_to - timedelta(days=60))
|
||||
ntf = 0.02 if non_top_day_factor is None else float(non_top_day_factor)
|
||||
dg = 1.0 if day_weight_gamma is None else float(day_weight_gamma)
|
||||
async with db.acquire() as conn:
|
||||
site_ok = await conn.fetchval(
|
||||
"SELECT EXISTS(SELECT 1 FROM ems.site WHERE id = $1)", site_id
|
||||
@@ -607,10 +587,7 @@ async def get_site_forecast_pv_slots_range_corrected(
|
||||
$4::timestamptz,
|
||||
$5::timestamptz,
|
||||
$6::numeric,
|
||||
$7::int,
|
||||
$8::int,
|
||||
$9::numeric,
|
||||
$10::numeric
|
||||
$7::int
|
||||
)
|
||||
""",
|
||||
site_id,
|
||||
@@ -620,9 +597,6 @@ async def get_site_forecast_pv_slots_range_corrected(
|
||||
delta_to,
|
||||
half_life_days,
|
||||
threshold_w,
|
||||
top_n_days,
|
||||
ntf,
|
||||
dg,
|
||||
)
|
||||
slots = raw if isinstance(raw, list) else []
|
||||
if not isinstance(slots, list):
|
||||
|
||||
Reference in New Issue
Block a user