cellular + storage analysis
This commit is contained in:
1 parent
1a18ddd059
commit
5a886b4e7e
5 files changed
+302
-5
No files matched your search
@@ -15,9 +15,9 @@ L'état courant seulement ; l'historique est dans `git log` et `docs/decisions.m
|
||||
- **Maquettes du site (D-022)** : client « Energy » (section Diagnostic de la page System Summary) ; support « Home » (section Status, une notification par station Orange ou Red, lien vers la vue client, D-025).
|
||||
- **Agents LLM côté serveur (D-027)** : rapport exploratoire seulement, rien n'est construit.
|
||||
- **Storage (D-030, D-034, D-035)** : jeu de travail WEISSHORN seul (NORDEND n'a pas les mesures de `/data`) ; `DAILY_STORAGE_STATE` et `DAYS_UNTIL_STORAGE_FULL` en prototype, sans cas de l'expert ; couleur du jour codée (`src/storage/day_color.py`, matrice état × horizon `docs/storage/matrice-etat-horizon.drawio`, la pire des deux) ; seuils arbitraires (20 % / 10 % libres, 60 / 14 jours) ; questions en suspens dans `docs/storage/domaine/questions-pour-l-expert.md` ; ni figure du site, ni maquette, ni guide (étape 7 de `nouveau-domaine`).
|
||||
- **Cellular (D-030 à D-032), en pause en attendant le spécialiste** : WEISSHORN (mise en service le 19/08, puis quelques incidents isolés) et NORDEND (109 jours, 11 coupures de la liaison) explorés ; `DAILY_LINK_STATE` et `DAILY_SIGNAL_STATE` en prototype, sans cas de l'expert ; deux corrections de `DAILY_LINK_STATE` retenues sur le principe mais non codées ; ni couleur du jour, ni figure du site, ni maquette, ni guide (étapes 6 et 7 de `nouveau-domaine`). Reprise : `docs/cellular/domaine/questions-pour-l-expert.md`.
|
||||
- **Cellular (D-030 à D-032, D-037), en pause en attendant le spécialiste** : WEISSHORN (mise en service le 19/08, puis quelques incidents isolés) et NORDEND (109 jours, 11 coupures de la liaison) explorés ; `DAILY_LINK_STATE` et `DAILY_SIGNAL_STATE` en prototype, sans cas de l'expert ; deux corrections de `DAILY_LINK_STATE` retenues sur le principe mais non codées ; couleur du jour codée (`src/cellular/day_color.py`, matrice lien × signal `docs/cellular/matrice-lien-signal.drawio` : Red si des envois manquent et que le signal n'est pas mesuré 20 h sur 24) ; ni figure du site, ni maquette, ni guide (étape 7 de `nouveau-domaine`). Reprise : `docs/cellular/domaine/questions-pour-l-expert.md`.
|
||||
- **Températures (D-036)** : explorées sur les trois stations, pas de domaine pour l'instant (ni épisode de chaleur, ni seuil sourcé, ni cas de l'expert) ; constats, pistes et questions dans `docs/domaine/temperatures-de-la-station.md`.
|
||||
- **Prochaine étape** : `cellular` : l'utilisateur voit avec le spécialiste les questions de `docs/cellular/domaine/questions-pour-l-expert.md` (cadence des envois, articulation des deux corrections de `DAILY_LINK_STATE`, retenues mais non codées, cas annotés) ; ensuite les corrections, puis la couleur du jour (étape 6) ; `storage` : la livraison (étape 7 de `nouveau-domaine`, dans une autre conversation : figure du site `src/storage/final.py`, passage des maquettes à une liste de domaines, maquettes à proposer puis attendre les consignes, guide `docs/storage/guide/`) ; températures : rien à faire avant les réponses du spécialiste (questions de `docs/domaine/temperatures-de-la-station.md`) ; repérer d'autres champs à notifier ; étape 1 du rapport d'agents (pilote manuel Energy sur l'historique de VERMONT, il faut une clé API Anthropic) ; mise en forme du manuel avec le plugin Interactive Docs (dans une autre conversation) ; choisir avec l'équipe du site le format d'intégration du graphique ; maquettes : poursuivre « Energy » côté client pas à pas, puis le côté support pas à pas (points ouverts dans D-022).
|
||||
- **Prochaine étape** : `cellular` : l'utilisateur voit avec le spécialiste les questions de `docs/cellular/domaine/questions-pour-l-expert.md` (cadence des envois, articulation des deux corrections de `DAILY_LINK_STATE`, retenues mais non codées, cas annotés) ; ensuite les corrections, puis la livraison (étape 7) ; `storage` : la livraison (étape 7 de `nouveau-domaine`, dans une autre conversation : figure du site `src/storage/final.py`, passage des maquettes à une liste de domaines, maquettes à proposer puis attendre les consignes, guide `docs/storage/guide/`) ; températures : rien à faire avant les réponses du spécialiste (questions de `docs/domaine/temperatures-de-la-station.md`) ; repérer d'autres champs à notifier ; étape 1 du rapport d'agents (pilote manuel Energy sur l'historique de VERMONT, il faut une clé API Anthropic) ; mise en forme du manuel avec le plugin Interactive Docs (dans une autre conversation) ; choisir avec l'équipe du site le format d'intégration du graphique ; maquettes : poursuivre « Energy » côté client pas à pas, puis le côté support pas à pas (points ouverts dans D-022).
|
||||
|
||||
## Analyses (domaine Energy)
|
||||
|
||||
@@ -44,6 +44,8 @@ Code dans `src/cellular/`, fiche dans `docs/cellular/analyses/<règle en minuscu
|
||||
| `DAILY_LINK_STATE` | Chaque jour : tous les envois arrivés avec `link = up`, un lien signalé `down`, ou des envois ou messages manquants ? | prototype (D-031) | `link_state.py` |
|
||||
| `DAILY_SIGNAL_STATE` | Chaque jour : médianes du RSRP et du RSRQ sur la grille publiée (excellent, bon, moyen, limite de cellule) | prototype (D-031) | `signal_state.py` |
|
||||
|
||||
- **Couleur du jour** : `src/cellular/day_color.py` (`MATRIX[lien][signal]`, `HEADLINE`), transcription de `docs/cellular/matrice-lien-signal.drawio` (D-037).
|
||||
|
||||
## Analyses (domaine Storage)
|
||||
|
||||
Code dans `src/storage/`, fiche dans `docs/storage/analyses/<règle en minuscules>.md`, page de comparaison `src/storage/all_analyses.py` (WEISSHORN, D-034).
|
||||
@@ -85,7 +87,7 @@ python3 -m venv .venv && .venv/bin/pip install plotly # recréer .venv
|
||||
### Fichiers
|
||||
|
||||
- `README.md` (40 l) : point d'entrée pour un humain.
|
||||
- `docs/decisions.md` (386 l, D-001 à D-036) : décisions **projet**, au format ADR allégé (statut, décision, pourquoi, options écartées, conséquence). À consulter avant de changer d'orientation ou de reproposer une option : elle a peut-être déjà été écartée.
|
||||
- `docs/decisions.md` (396 l, D-001 à D-037) : décisions **projet**, au format ADR allégé (statut, décision, pourquoi, options écartées, conséquence). À consulter avant de changer d'orientation ou de reproposer une option : elle a peut-être déjà été écartée.
|
||||
- `docs/domaine/` : savoir métier commun, une note courte (< 50 l) par question.
|
||||
- `ce-que-mesure-la-station.md` : format CSV, métriques et unités, consommation mesurée mais pas l'apport.
|
||||
- `pieges-des-donnees.md` : trou ≠ coupure, signatures d'une coupure, seuils absolus, cycle jour/nuit.
|
||||
@@ -96,7 +98,7 @@ python3 -m venv .venv && .venv/bin/pip install plotly # recréer .venv
|
||||
- `domaine/` (< 80 l) : `comment-se-comporte-la-batterie.md` (LiFePO4, plateau et coude, table OCV, redémarrage à 12,6 V, capacité) ; `tensions-selon-l-etat-de-la-batterie.md` (tensions et pentes en charge, pleine charge et décharge) ; `cas-annotes-par-l-expert.md` (diagnostics experts des 5 stations, vérité de référence).
|
||||
- `guide/diagnostic-energetique.md` (180 l, brouillon) : manuel, partie 1 pour le client (§1-4), partie 2 pour le support (§5-9). À tenir à jour avec la matrice et les fiches des deux analyses livrées.
|
||||
- `matrice-etat-tendance.drawio` : matrice état × tendance, tenue par l'utilisateur.
|
||||
- `docs/storage/`, `docs/cellular/` : domaines Storage (espace disque) et Cellular (signal 4G), D-030. Storage a sa matrice état × horizon, `matrice-etat-horizon.drawio`, tenue par l'utilisateur. Chacun a une note de départ, `domaine/point-de-depart.md` (mesures du collecteur, données reçues, pièges, pistes), ses fiches dans `analyses/` et ses questions ouvertes dans `domaine/questions-pour-l-expert.md`.
|
||||
- `docs/storage/`, `docs/cellular/` : domaines Storage (espace disque) et Cellular (signal 4G), D-030. Storage a sa matrice état × horizon, `matrice-etat-horizon.drawio`, Cellular sa matrice lien × signal, `matrice-lien-signal.drawio`, tenues par l'utilisateur. Chacun a une note de départ, `domaine/point-de-depart.md` (mesures du collecteur, données reçues, pièges, pistes), ses fiches dans `analyses/` et ses questions ouvertes dans `domaine/questions-pour-l-expert.md`.
|
||||
- `docs/agents/rapport-exploratoire.md` (290 l) : cadre d'agents LLM (D-027) : choix retenus, architecture, démarrage par étapes (§6) ; annexe A : pistes à revoir étape par étape. Le code d'agent vivra à part (`agents/`, proposé, pas créé).
|
||||
- `docs/aimsight/` : documentation AIMsight d'origine, en anglais, non modifiée. À lire avant de concevoir, **par section** ; ne pas re-demander à l'utilisateur ce qui y figure.
|
||||
- `AIMsight_reference_quality_event_explainer_roadmap.md` (1 180 l) : **référence qui fait autorité** : couche diagnostique commune, explainer d'événements, classifications (§4.3), API indépendante de l'estimateur (§10).
|
||||
@@ -113,7 +115,7 @@ python3 -m venv .venv && .venv/bin/pip install plotly # recréer .venv
|
||||
- `src/` : un sous-dossier par domaine, plus le code commun (D-026).
|
||||
- `common/` : `stations.py` (chargement des CSV, métriques texte en listes, trous de mesure ; bibliothèque standard) et `page.py` (poste de dev : bascule `.venv`, ouverture dans le navigateur, `AUTOSCALE_Y_JS`).
|
||||
- `energy/` : calcul embarquable, en bibliothèque standard et sans import de `common/` : `battery_state.py`, `battery_trend.py`, `moving_average.py`, `day_color.py`. Scripts plotly du poste de dev, à laisser hors de la station : `final.py`, `all_analyses.py`, `focus_jour.py`.
|
||||
- `cellular/` : calcul embarquable `link_state.py`, `signal_state.py` ; page plotly `all_analyses.py` (D-031).
|
||||
- `cellular/` : calcul embarquable `link_state.py`, `signal_state.py`, `day_color.py` (D-037) ; page plotly `all_analyses.py` (D-031).
|
||||
- `storage/` : calcul embarquable `storage_state.py`, `days_until_full.py`, `day_color.py` (D-035) ; page plotly `all_analyses.py` (D-034).
|
||||
- `maquettes/` : maquettes du site en HTML sur données réelles (D-022), Figma seulement sur demande. Un script remplit son gabarit HTML : `user/energy.py` + `energy_template.html` (client), `support/home.py` + `home_template.html` (support).
|
||||
- `.claude/` : `rules/analyses.md` (se charge seule, voir « Analyses »), `skills/nouvelle-analyse/` (procédure et modèle de fiche), `skills/nouveau-domaine/` (procédure pour un nouveau domaine), `settings.json` (lecture de `.env` interdite).
|
||||
|
||||
@@ -0,0 +1,232 @@
|
||||
<mxfile host="Electron">
|
||||
<diagram id="cellular-matrice-lien-signal" name="Matrice lien × signal">
|
||||
<mxGraphModel dx="1153" dy="817" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1190" pageHeight="900" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="cell-link" parent="1" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" value="État du lien (DAILY_LINK_STATE, jour J)" vertex="1">
|
||||
<mxGeometry height="150" width="330" x="40" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-link-i0" parent="cell-link" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#008300">● UP</font> : tous les envois arrivés, lien actif" vertex="1">
|
||||
<mxGeometry height="30" width="330" y="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-link-i1" parent="cell-link" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#eda100">◆ MISSING</font> : des envois ou des messages manquent" vertex="1">
|
||||
<mxGeometry height="30" width="330" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-link-i2" parent="cell-link" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#4a3aa7">✕ DOWN</font> : le modem a signalé le lien coupé" vertex="1">
|
||||
<mxGeometry height="30" width="330" y="90" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-link-i3" parent="cell-link" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#8c8c8c">○ inconnu</font> : jour coupé par l'export, début d'historique" vertex="1">
|
||||
<mxGeometry height="30" width="330" y="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal" parent="1" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" value="Signal (DAILY_SIGNAL_STATE, médianes du jour, la pire des deux)" vertex="1">
|
||||
<mxGeometry height="180" width="400" x="400" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal-i0" parent="cell-signal" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#008300">● EXCELLENT</font> : RSRP ≥ −80 dBm et RSRQ ≥ −10 dB" vertex="1">
|
||||
<mxGeometry height="30" width="400" y="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal-i1" parent="cell-signal" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#2a78d6">■ GOOD</font> : jusqu'à −90 dBm / −15 dB" vertex="1">
|
||||
<mxGeometry height="30" width="400" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal-i2" parent="cell-signal" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#eda100">◆ MID_CELL</font> : jusqu'à −100 dBm / −20 dB" vertex="1">
|
||||
<mxGeometry height="30" width="400" y="90" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal-i3" parent="cell-signal" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#4a3aa7">✕ CELL_EDGE</font> : en dessous" vertex="1">
|
||||
<mxGeometry height="30" width="400" y="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-signal-i4" parent="cell-signal" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fontSize=11;" value="<font color="#8c8c8c">○ inconnu</font> : moins de 20 h mesurées sur 24" vertex="1">
|
||||
<mxGeometry height="30" width="400" y="150" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-levels" parent="1" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=30;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" value="Niveaux de préoccupation" vertex="1">
|
||||
<mxGeometry height="150" width="260" x="830" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-levels-i0" parent="cell-levels" style="text;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fillColor=light-dark(#33FF33,#33FF33);fontColor=#000000;" value="Vert : toutes les données arrivent" vertex="1">
|
||||
<mxGeometry height="30" width="260" y="30" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-levels-i1" parent="cell-levels" style="text;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" value="Orange : des envois manquent, à surveiller" vertex="1">
|
||||
<mxGeometry height="30" width="260" y="60" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-levels-i2" parent="cell-levels" style="text;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fillColor=light-dark(#FF0000,#FF0000);fontColor=#ffffff;" value="Rouge : la station s'est tue une bonne partie du jour" vertex="1">
|
||||
<mxGeometry height="30" width="260" y="90" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-levels-i3" parent="cell-levels" style="text;strokeColor=none;align=left;verticalAlign=middle;spacingLeft=4;spacingRight=4;overflow=hidden;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;rotatable=0;whiteSpace=wrap;html=1;fillColor=light-dark(#8C8C8C,#8C8C8C);fontColor=#ffffff;" value="Gris : inconnu" vertex="1">
|
||||
<mxGeometry height="30" width="260" y="120" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix" parent="1" style="shape=table;startSize=0;container=1;collapsible=0;childLayout=tableLayout;fixedHeader=1;strokeColor=light-dark(#FFFFFF,#FFFFFF);" value="" vertex="1">
|
||||
<mxGeometry height="369" width="760" x="40" y="270" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r0" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="19" width="760" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r0-c0" parent="cell-matrix-r0" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="" vertex="1">
|
||||
<mxGeometry height="19" width="130" as="geometry">
|
||||
<mxRectangle height="19" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r0-c1" parent="cell-matrix-r0" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#008300">● UP</font>" vertex="1">
|
||||
<mxGeometry height="19" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="19" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r0-c2" parent="cell-matrix-r0" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#eda100">◆ MISSING</font>" vertex="1">
|
||||
<mxGeometry height="19" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="19" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r0-c3" parent="cell-matrix-r0" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#4a3aa7">✕ DOWN</font>" vertex="1">
|
||||
<mxGeometry height="19" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="19" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r1" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="70" width="760" y="19" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r1-c0" parent="cell-matrix-r1" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#008300">● EXCELLENT</font>" vertex="1">
|
||||
<mxGeometry height="70" width="130" as="geometry">
|
||||
<mxRectangle height="70" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<UserObject label="" tooltip="Vert : tous les envois sont arrivés, signal excellent. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r1-c1">
|
||||
<mxCell parent="cell-matrix-r1" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#33FF33,#33FF33);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : des envois ou des messages manquent, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Cause non établie : lien, énergie, réception côté serveur. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r1-c2">
|
||||
<mxCell parent="cell-matrix-r1" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : le modem a signalé le lien coupé au moins une fois, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Un seul « down » suffit, même fugitif. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r1-c3">
|
||||
<mxCell parent="cell-matrix-r1" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<mxCell id="cell-matrix-r2" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="70" width="760" y="89" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r2-c0" parent="cell-matrix-r2" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#2a78d6">■ GOOD</font>" vertex="1">
|
||||
<mxGeometry height="70" width="130" as="geometry">
|
||||
<mxRectangle height="70" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<UserObject label="" tooltip="Vert : tous les envois sont arrivés, lien actif. WEISSHORN : 46 j (21/08 au 12/10). NORDEND : 0 j." id="cell-matrix-r2-c1">
|
||||
<mxCell parent="cell-matrix-r2" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#33FF33,#33FF33);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : des envois ou des messages manquent, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Cause non établie : lien, énergie, réception côté serveur. WEISSHORN : 6 j (22/08 : 3 envois, pendant des écritures sur /data ; 29/08, 30/08, 01/09, 05/09, 06/09 : 1 envoi entre 01:00 et 02:00 UTC). NORDEND : 0 j." id="cell-matrix-r2-c2">
|
||||
<mxCell parent="cell-matrix-r2" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : le modem a signalé le lien coupé au moins une fois, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Un seul « down » suffit, même fugitif. WEISSHORN : 1 j (03/09 : un seul « down » à 15:00, les 96 envois arrivés). NORDEND : 0 j." id="cell-matrix-r2-c3">
|
||||
<mxCell parent="cell-matrix-r2" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<mxCell id="cell-matrix-r3" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="70" width="760" y="159" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r3-c0" parent="cell-matrix-r3" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#eda100">◆ MID_CELL</font>" vertex="1">
|
||||
<mxGeometry height="70" width="130" as="geometry">
|
||||
<mxRectangle height="70" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<UserObject label="" tooltip="Vert : tous les envois sont arrivés, signal moyen. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r3-c1">
|
||||
<mxCell parent="cell-matrix-r3" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#33FF33,#33FF33);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : des envois ou des messages manquent, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Cause non établie : lien, énergie, réception côté serveur. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r3-c2">
|
||||
<mxCell parent="cell-matrix-r3" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : le modem a signalé le lien coupé au moins une fois, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Un seul « down » suffit, même fugitif. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r3-c3">
|
||||
<mxCell parent="cell-matrix-r3" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<mxCell id="cell-matrix-r4" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="70" width="760" y="229" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r4-c0" parent="cell-matrix-r4" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#4a3aa7">✕ CELL_EDGE</font>" vertex="1">
|
||||
<mxGeometry height="70" width="130" as="geometry">
|
||||
<mxRectangle height="70" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<UserObject label="" tooltip="Vert, à confirmer : tous les envois sont arrivés malgré un signal en limite de cellule. La grille ne sépare pas les bons jours des mauvais sur NORDEND (fiche daily_signal_state) ; en orange, NORDEND notifierait 76 jours sur 109. WEISSHORN : 0 j. NORDEND : 76 j (sans « link » : UP veut dire tous les envois arrivés)." id="cell-matrix-r4-c1">
|
||||
<mxCell parent="cell-matrix-r4" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#33FF33,#33FF33);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : des envois ou des messages manquent, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Cause non établie : lien, énergie, réception côté serveur. WEISSHORN : 0 j. NORDEND : 20 j, de 1 à 12 envois manquants (10/07 : 8 ; 20/08 : 12 ; les autres de 1 à 5, surtout du 26/08 au 06/09). Le 15/07 est un artefact du comptage par heure (fiche daily_link_state, limite 9)." id="cell-matrix-r4-c2">
|
||||
<mxCell parent="cell-matrix-r4" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Orange : le modem a signalé le lien coupé au moins une fois, mais la station a transmis presque toute la journée (signal mesuré 20 h ou plus). Un seul « down » suffit, même fugitif. WEISSHORN : 0 j. NORDEND : 0 j. (NORDEND n'a pas « link » : jamais DOWN)." id="cell-matrix-r4-c3">
|
||||
<mxCell parent="cell-matrix-r4" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FFFF00,#FFFF00);fontColor=#000000;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<mxCell id="cell-matrix-r5" parent="cell-matrix" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;strokeColor=inherit;collapsible=0;dropTarget=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;fixedHeader=1;" value="" vertex="1">
|
||||
<mxGeometry height="70" width="760" y="299" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="cell-matrix-r5-c0" parent="cell-matrix-r5" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;fontStyle=1;align=center;verticalAlign=middle;fillColor=#f5f5f5;" value="<font color="#8c8c8c">○ inconnu</font>" vertex="1">
|
||||
<mxGeometry height="70" width="130" as="geometry">
|
||||
<mxRectangle height="70" width="130" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<UserObject label="" tooltip="Gris : tous les envois sont arrivés, mais le signal n'a pas été mesuré 5 h ou plus (lecture du modem qui échoue ?). Vert demande les deux analyses. WEISSHORN : 0 j. NORDEND : 0 j." id="cell-matrix-r5-c1">
|
||||
<mxCell parent="cell-matrix-r5" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#8C8C8C,#8C8C8C);fontColor=#ffffff;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="130" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Rouge : des envois manquent et le signal n'a pas été mesuré 5 h ou plus : la station s'est tue une bonne partie de la journée. WEISSHORN : 0 j. NORDEND : 9 j, les coupures de 1 à 23 h (30/06, 01/07, 11 au 13/07, 22-23/07, 19/08, 22/08 : 23 à 95 envois manquants). Le 10/07 (8) et le 20/08 (12) restent orange." id="cell-matrix-r5-c2">
|
||||
<mxCell parent="cell-matrix-r5" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FF0000,#FF0000);fontColor=#ffffff;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="340" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<UserObject label="" tooltip="Rouge : lien signalé coupé et signal non mesuré 5 h ou plus : la station s'est tue une bonne partie de la journée. WEISSHORN : 1 j (20/08, fin de la mise en service : 43 envois manquants, au retour d'un trou de 18 h). NORDEND : 0 j." id="cell-matrix-r5-c3">
|
||||
<mxCell parent="cell-matrix-r5" style="shape=partialRectangle;html=1;whiteSpace=wrap;connectable=0;strokeColor=inherit;overflow=hidden;pointerEvents=1;align=center;verticalAlign=middle;fontStyle=1;spacing=6;fontSize=11;fillColor=light-dark(#FF0000,#FF0000);fontColor=#ffffff;" vertex="1">
|
||||
<mxGeometry height="70" width="210" x="550" as="geometry">
|
||||
<mxRectangle height="70" width="210" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</UserObject>
|
||||
<mxCell id="cell-note" parent="1" style="text;html=1;align=left;verticalAlign=top;whiteSpace=wrap;fontSize=11;" value="Matrice validée par l'utilisateur le 2026-10-13 (D-037). État du lien inconnu (jour coupé par l'export, début d'historique) : gris, quel que soit le signal.<br>Signal inconnu avec des envois manquants : la station s'est tue 5 h ou plus (MIN_COVERAGE = 20 h sur 24). Sur NORDEND, ce sont 9 des 11 jours de coupure lourde.<br>Non pris en compte : le croisement avec Energy (une coupure d'énergie fait aussi manquer les envois), les deux corrections de DAILY_LINK_STATE, retenues mais non codées, et les seuils du signal, à confirmer (<code>docs/cellular/domaine/questions-pour-l-expert.md</code>).<br>Code : <code>src/cellular/day_color.py</code>, MATRIX[lien][signal], transcription de ce schéma." vertex="1">
|
||||
<mxGeometry height="75" width="760" x="40" y="659" as="geometry" />
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
@@ -384,3 +384,13 @@ Règles du journal :
|
||||
- **Pourquoi** : choix de l'utilisateur, sur proposition. Aucun épisode de chaleur dans les données (maximum 62,7 °C, NORDEND, le 13/08), aucun seuil du matériel ni de la documentation AIMsight, aucun cas de l'expert : un verdict serait vert tous les jours, ou rouge sur un seuil inventé.
|
||||
- **Options écartées** : un domaine surchauffe comparant la station à son propre passé (il signalerait les jours d'été chauds, pas un défaut) ; l'amplitude du jour comme indice d'ensoleillement pour Energy (corrélation avec la tension maximale du jour de −0,03 à 0,32) ; la température au retour d'un trou comme preuve seule d'une coupure (le trou commun du 19/08 revient aussi ~7 °C sous l'habitude).
|
||||
- **Conséquence** : à reprendre avec les seuils thermiques du matériel, un premier incident annoté, ou les données d'hiver (froid et charge de la batterie LiFePO4).
|
||||
|
||||
## D-037 — 2026-10-13 — Cellular : couleur du jour, matrice lien × signal
|
||||
- **Statut** : active. Applique le contrat de notification de D-030 au domaine Cellular ; complète D-031 et D-032.
|
||||
- **Décision** :
|
||||
- `src/cellular/day_color.py` : la couleur du jour se lit dans une matrice lien × signal, tenue par l'utilisateur dans `docs/cellular/matrice-lien-signal.drawio` et recopiée dans `MATRIX`, comme pour Energy (D-020) et Storage (D-035). Le lien vient de `DAILY_LINK_STATE` (`UP`, `MISSING`, `DOWN`) ; le signal de `DAILY_SIGNAL_STATE` (`EXCELLENT`, `GOOD`, `MID_CELL`, `CELL_EDGE`), ou inconnu (moins de 20 h mesurées sur 24) ;
|
||||
- Green : tous les envois sont arrivés, signal connu, quelle que soit sa classe (`CELL_EDGE` compris). Orange : `MISSING` ou `DOWN` avec un signal connu. Red : `MISSING` ou `DOWN` avec un signal inconnu, c'est-à-dire une station qui s'est tue 5 h ou plus. Gris : lien inconnu, ou `UP` avec un signal inconnu (Green demande les deux analyses) ;
|
||||
- `HEADLINE` : Red « The station stopped sending data for a large part of the day. », Orange « The station's 4G connection showed interruptions. ».
|
||||
- **Pourquoi** : choix de l'utilisateur, sur proposition. Le Red reprend `MIN_COVERAGE`, déjà sourcé, sans nouveau seuil : sur NORDEND, il retient 9 des 11 jours de coupure lourde (23 à 95 envois manquants), et aucun des petits manques (1 à 5 envois).
|
||||
- **Options écartées** : `UP` × `CELL_EDGE` en Orange (NORDEND déclencherait une notification 76 jours sur 109 alors que tous ses envois sont arrivés ; la grille ne sépare pas ses bons jours des mauvais, fiche `daily_signal_state`) ; `DOWN` en Red dès un échantillon (le `down` fugitif du 03/09 sur WEISSHORN, les 96 envois arrivés) ; un nombre d'envois manquants comme seuil du Red (pas de source, pas de cas de l'expert).
|
||||
- **Conséquence** : WEISSHORN, 46 jours Green, 7 Orange, 1 Red (20/08, fin de la mise en service), 12 gris ; NORDEND, 76 Green, 20 Orange, 9 Red, 5 gris. Tant que le signal est connu, sa classe ne change pas la couleur. Restent hors de la matrice : le croisement avec Energy, les deux corrections de `DAILY_LINK_STATE` (le 15/07 de NORDEND repasserait Green) et les seuils du signal, en attente du spécialiste.
|
||||
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
git pull --rebase --autostash
|
||||
git add -A
|
||||
git commit -m "$1"
|
||||
git push
|
||||
@@ -0,0 +1,47 @@
|
||||
"""Couleur du jour Cellular : matrice lien (DAILY_LINK_STATE) × signal (DAILY_SIGNAL_STATE) -> vert / orange / rouge (D-037).
|
||||
|
||||
Documentation : docs/cellular/matrice-lien-signal.drawio, docs/decisions.md (D-037)
|
||||
Bibliothèque standard uniquement (cible : système embarqué de la station).
|
||||
"""
|
||||
from cellular import link_state as ls, signal_state as ss
|
||||
|
||||
# Matrice tenue par l'utilisateur dans docs/cellular/matrice-lien-signal.drawio : MATRIX[lien][signal].
|
||||
# Signal None : moins de 20 h mesurées sur 24 ; avec des envois manquants, la station s'est tue 5 h ou plus.
|
||||
# Lien None (jour coupé par l'export, début d'historique) : gris, quel que soit le signal.
|
||||
KNOWN = ss.CLASSES # EXCELLENT, GOOD, MID_CELL, CELL_EDGE
|
||||
MATRIX = {
|
||||
"UP": {**dict.fromkeys(KNOWN, "GREEN"), None: None},
|
||||
"MISSING": {**dict.fromkeys(KNOWN, "ORANGE"), None: "RED"},
|
||||
"DOWN": {**dict.fromkeys(KNOWN, "ORANGE"), None: "RED"},
|
||||
}
|
||||
|
||||
# Une phrase par couleur notifiée, en anglais (D-023) ; Green ne notifie rien (D-025).
|
||||
HEADLINE = {"RED": "The station stopped sending data for a large part of the day.",
|
||||
"ORANGE": "The station's 4G connection showed interruptions."}
|
||||
|
||||
RULE = {
|
||||
"id": "DAY_COLOR",
|
||||
"verdict": "aucun : anomaly = None ; la couleur est dans facts.color (None = inconnu)",
|
||||
"matrix": MATRIX,
|
||||
"doc": "docs/cellular/matrice-lien-signal.drawio",
|
||||
}
|
||||
|
||||
|
||||
def run(series):
|
||||
"""Couleur du jour, causale comme les deux analyses. Un point par jour UTC, aux jours de DAILY_LINK_STATE."""
|
||||
signal = {p["t"].date(): p["facts"] for p in ss.run(series)["points"]}
|
||||
points = []
|
||||
for p in ls.run(series)["points"]:
|
||||
s = signal.get(p["t"].date(), {})
|
||||
facts = {**p["facts"], "signal_state": s.get("state"), "coverage": s.get("coverage")}
|
||||
facts["color"] = MATRIX.get(facts["state"], {}).get(facts["signal_state"])
|
||||
points.append({"t": p["t"], "value": facts["color"], "anomaly": None, "facts": facts})
|
||||
return {"analysis": RULE["id"], "rule": RULE, "points": points}
|
||||
|
||||
|
||||
if __name__ == "__main__": # contrôle de la transcription : les cases du schéma
|
||||
assert MATRIX["UP"]["CELL_EDGE"] == "GREEN" and MATRIX["UP"][None] is None
|
||||
assert MATRIX["MISSING"]["GOOD"] == MATRIX["DOWN"]["CELL_EDGE"] == "ORANGE"
|
||||
assert MATRIX["MISSING"][None] == MATRIX["DOWN"][None] == "RED"
|
||||
assert MATRIX.get(None, {}).get("GOOD") is None
|
||||
print("ok")
|
||||
Reference in new issue
Block a user