Advisor: premier câblage réel — cible SOC matin (toggle, bornes, fraîcheur 120min)

- nouveau toggle input_boolean.evcs_advisor_apply_night_target (package + carte, OFF par défaut)
- snapshot/INPUT_PARSE: advisor_apply/target/status/last_run (+parseAdvisorRunToMs DD/MM HH:mm)
- WINDOWS: batteryMorningTargetPct = advisor si ON+ok+frais, clamp [max(22,hardFloor),90],
  sinon règles forecast; traçabilité '(ADVISOR)' dans la reason DECISION
- golden 26→29 (appliqué / stale / toggle off)
- HANDOFF §20 (surveillance + rollback 3 niveaux)
This commit is contained in:
Tallagrand Thierry
2026-08-09 07:32:46 +02:00
parent 6ca6ea99de
commit 98c9202bad
8 changed files with 214 additions and 7 deletions

View File

@@ -135,6 +135,79 @@ export const scenarios = [
},
},
// ===== ADVISOR IA — premier câblage réel (09/08/2026, HANDOFF §20) =====
// Référence : night-soc-sous-cible (SOC 30 < cible règle 35 → grid_forced).
// Avec la cible advisor 22 APPLIQUÉE : SOC 30 ≥ 22 → grid_hc_allowed.
{
id: 'night-advisor-target-applique',
label: 'Nuit HC, SOC 30, advisor cible 22 appliquée (toggle ON, ok, frais) → hc_allowed au lieu de grid_forced',
time: NIGHT,
overrides: {
...VEHICLE_NIGHT, soc_percent: '30', allow_grid_hc_night: 'on',
advisor_apply_night_target: 'on',
advisor_night_target_soc: '22',
advisor_status: 'ok',
advisor_last_run: '08/08 01:20',
},
expect: {
profile: 'night_hc',
sourceMode: 'grid_hc_allowed',
state: 'night_wait_grid_takeover',
decision: 'hold',
desiredCharging: false,
currentA: 6,
takeoverNeeded: true,
edfOnAction: true,
takeoverHelperService: 'turn_on',
},
},
{
id: 'night-advisor-target-stale',
label: 'Nuit HC, SOC 30, advisor cible 22 mais recommandation > 120 min → fallback règles (grid_forced)',
time: NIGHT,
overrides: {
...VEHICLE_NIGHT, soc_percent: '30', allow_grid_hc_night: 'on',
advisor_apply_night_target: 'on',
advisor_night_target_soc: '22',
advisor_status: 'ok',
advisor_last_run: '07/08 20:00',
},
expect: {
profile: 'night_hc',
sourceMode: 'grid_forced',
state: 'night_wait_grid_takeover',
decision: 'hold',
desiredCharging: false,
currentA: 6,
takeoverNeeded: true,
edfOnAction: true,
takeoverHelperService: 'turn_on',
},
},
{
id: 'night-advisor-toggle-off',
label: 'Nuit HC, SOC 30, advisor cible 22 mais toggle APPLIQUER OFF → règles inchangées (grid_forced)',
time: NIGHT,
overrides: {
...VEHICLE_NIGHT, soc_percent: '30', allow_grid_hc_night: 'on',
advisor_apply_night_target: 'off',
advisor_night_target_soc: '22',
advisor_status: 'ok',
advisor_last_run: '08/08 01:20',
},
expect: {
profile: 'night_hc',
sourceMode: 'grid_forced',
state: 'night_wait_grid_takeover',
decision: 'hold',
desiredCharging: false,
currentA: 6,
takeoverNeeded: true,
edfOnAction: true,
takeoverHelperService: 'turn_on',
},
},
// ================= FIN DE CHARGE NUIT (P8) =================
{
id: 'night-vw-pleine-transition',