diff --git a/AGENTS.md b/AGENTS.md index dd9281d..5eb64f2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -16,19 +16,22 @@ vers un gestionnaire d'énergie complet (EV, ECS, PAC SG-Ready, batterie). | 1 — renommage .pro + métadonnées debian | ✅ FAITE | `f4d5b20` | | 2 — design arbitre validé | ✅ FAITE | `074fa71` | | 3a — structs protocole + interfaces | ✅ FAITE | `4ae1939` | -| 3b — EnergyArbitrator + scheduler + adapter | ⏳ CODE COMMITÉ, iso-fonctionnalité non prouvée | `5f49e4c` | +| 3b — EnergyArbitrator + scheduler + adapter | ✅ FAITE — iso-fonctionnalité prouvée | `5f49e4c`, `d8ebd65`, `[3b-iv]` | -**Détail 3b** (`5f49e4c`) : +**Détail 3b** : - `EnergyArbitrator : public SmartChargingManager` — justification dans `## DÉCISIONS DE DESIGN` - `EvAdapter` + `RuleBasedScheduler` implémentés - Build : **0 erreur / 0 warning** -- `ETM_ARBITRATOR` **commenté** dans `.pro` — flip inactif jusqu'à preuve iso +- `ETM_ARBITRATOR` **actif** dans `energyplugin.pri` +- Iso-fonctionnalité prouvée : + - Simulation : 226 lignes décisions identiques (Theoretically / Surplus / Current load), diff = 0 + - Tests charging : 57 lignes décisions identiques, diff = 0 ; 46/46 PASS ref ET ETM + - [Arbitre] présents avec raisons françaises pour les 4 cas (idle, surplus PV, aWATTar, deadline) -**PROCHAINE ACTION — 3b-iv** : -1. Décommenter `DEFINES += ETM_ARBITRATOR` dans `energyplugin.pro` -2. Lancer `docker-simulation.sh` -3. Vérifier les `decisionReason` dans les logs (`[Arbitre] `) et comparer le comportement EV avec l'amont sur les mêmes scénarios -4. Preuve iso-fonctionnelle validée → commit d'activation +**PROCHAINE ACTION — 3c** : +- `EcsRelayAdapter` (paliers 0/1/2) — premier adaptateur non-EV +- Pipeline ETM waterfall (budget surplus → ECS) dans `EnergyArbitrator::update()` +- Scénario simulation dédié : chauffe-eau sur surplus PV **Remotes git** : - `origin` (`https://git.etm-powersync.fr/...`) = remote de travail — push normal diff --git a/energyplugin/energyplugin.pri b/energyplugin/energyplugin.pri index cc18c4f..e3f265d 100644 --- a/energyplugin/energyplugin.pri +++ b/energyplugin/energyplugin.pri @@ -5,7 +5,7 @@ INCLUDEPATH += $$PWD # [ETM] Activate ETM arbitrator — replaces SmartChargingManager::update() with EnergyArbitrator. # Propagé à tous les consommateurs du .pri (plugin + simulation + tests). # Uncommenter pour activer. Commité DÉSACTIVÉ jusqu'à preuve iso (3b-iv). -# DEFINES += ETM_ARBITRATOR +DEFINES += ETM_ARBITRATOR greaterThan(QT_MAJOR_VERSION, 5) { message("Building using Qt6 support") diff --git a/energyplugin/etm/energyarbitrator.cpp b/energyplugin/etm/energyarbitrator.cpp index 92b5771..857e1c5 100644 --- a/energyplugin/etm/energyarbitrator.cpp +++ b/energyplugin/etm/energyarbitrator.cpp @@ -53,6 +53,7 @@ RootMeter *EnergyArbitrator::registeredRootMeter() const void EnergyArbitrator::update(const QDateTime ¤tDateTime) { + qCDebug(dcNymeaEnergy()) << "Updating smart charging"; // Ordre IDENTIQUE à SmartChargingManager::update() — INTERDIT de réordonner. // SCM : 1.updateManual 2.prepareInfo 3.verifyOverload 4.verifyRecovery // 5.planSpot 6.planSurplus 7.adjustEv