load-curve.seed-from-profile — explanation
Why
C4/C3/C2 customers without Linky access or a CDC upload still need a plausible
half-hour shape to drive tarif négocié optimization. Rather than hand-rolling
shapes per NAF, we ground the seed in the Enedis-published **fictive load
curves library* (courbes-fictives- datasets on opendata.enedis.fr).
Inputs
```
{
segment: "RES1" | "RES2" | "PRO1" | "ENT1" | "NAF",
naf: string | null,
kva_band: string | null,
annual_kwh: number,
}
```
Algorithm
pickCurve ranks every curve in the supplied
library by a deterministic score:
- exact NAF match → +100
- exact segment match → +50
- exact kVA band match → +25
- otherwise the best partial match wins; ties broken by curve_key alphabetical order.
each half-hour is multiplied by annual_kwh / 8760 × 2 to obtain a kWh
per half-hour series. Hourly output is the pair-sum across the 17 520
half-hours.
The rescaling step is linear and energy-conserving by construction:
sum(output) == annual_kwh within floating-point error.
Limits
actual site may diverge — the normalization method (thermosensitive)
layers on top.
pairing this seed with a 30-minute HP/HC mask if needed.
falls back to the closest segment-level curve and emits a warning.