Consigne reseau : la part voiture suit la puissance reelle quand la voiture plafonne (boost Volvo du 14/10 : batterie rechargee en HP)

This commit is contained in:
Tallagrand Thierry
2026-10-15 12:51:49 +02:00
parent 5cd9468b6f
commit 52c1703b6e
5 changed files with 265 additions and 2 deletions

View File

@@ -184,6 +184,13 @@ for (const sc of scenarios) {
const diffs = [];
for (const [k, v] of Object.entries(sc.expect || {})) {
// 14/10/2026 : bornes sur la consigne reseau ecrite ce cycle.
if (k === 'gridSetpointBelowW' || k === 'gridSetpointAtLeastW') {
const w = got.gridSetpointW;
const ok = Number.isFinite(w) && (k === 'gridSetpointBelowW' ? w < v : w >= v);
if (!ok) diffs.push(`${k}: attendu ${k === 'gridSetpointBelowW' ? '<' : '>='} ${v}, obtenu ${JSON.stringify(w)}`);
continue;
}
if (JSON.stringify(got[k]) !== JSON.stringify(v)) diffs.push(`${k}: attendu ${JSON.stringify(v)}, obtenu ${JSON.stringify(got[k])}`);
}
if (diffs.length) {