r-io suiter-io suitesupervision docs
← Supervision
Supervision / Strategy 09 · checked by default

Expected states

A task reported as done does not prove that its effect is there. This strategy reads what the function of the task expects (“Extinguish a barbecue” leaves the barbecue Off) and compares it with the state the sensors give the instance on the field. The task is done, the barbecue is still On: that is a Failing deviation.

implemented byExpectedStateStrategy · gind-detection-engine-expected-state-strategy
01 · What it reads

The state asked, the state observed

On the task — the “From Instance” rows of its consumes table that carry an expectedState. A “From Concept” row of the function becomes such a row at deduction, on the instance the problem impacts: see what a function asks.

On the field — the current state of the ACTIVE instance, or its default state when it has none yet. Only the server writes this state, from the sensors, through the state machine of the asset.

02 · Score

One contribution per instance out of state

for each task done, once its grace is over:
  for each From Instance row with an expected state:
    if the instance is on the field and its state ≠ expected → contribution mismatch / threshold on Failing

The grace — the field is given some time after the end of the task: a barbecue takes a while to cool down. Before the grace is over, the task is not judged.

The message — each contribution is on the field world and names the task, the instance and both states: "Extinguish a barbecue" is done but "Martinez barbecue" is On, not Off. With nothing to report, Failing receives 0 from this strategy.

03 · Parameters

Default configuration

Defaults of getDefaultConfiguration. No configuration form ships in supervision-strategy-extensions.json for this strategy: the supervision box only checks or unchecks it.

ParameterKeyDefaultMeaning
Gracegrace30Seconds given to the field after the end of the task before its state counts.
Mismatchmismatch1.0Weight of an instance out of its expected state; at 0 or below, nothing is counted.
Thresholdthreshold1.0Weighted sum at which Failing reaches 1.
04 · Watch points

What it does not judge

States only — the expected sensor value (expectedValue) and the expected position (expectedPosition) of a consumes row are read by the knowledge consolidation and by the simulation, not by this strategy.

An instance without state — with neither a current nor a default state, or absent from the field, the row is skipped: no deviation can be established.

Supervision / Stratégie 09 · cochée par défaut

États attendus

Une tâche déclarée faite ne prouve pas que son effet est là. Cette stratégie lit ce qu’attend la fonction de la tâche (« Extinguish a barbecue » laisse le barbecue Off) et le compare à l’état que les capteurs donnent à l’instance sur le terrain. La tâche est faite, le barbecue est toujours On : c’est un écart Failing.

implémentée parExpectedStateStrategy · gind-detection-engine-expected-state-strategy
01 · Ce qu’elle lit

L’état demandé, l’état observé

Sur la tâche — les lignes « From Instance » de sa table consumes qui portent un expectedState. Une ligne « From Concept » de la fonction devient une telle ligne à la déduction, sur l’instance impactée par le problème : voir ce que demande une fonction.

Sur le terrain — le current state de l’instance ACTIVE, ou son default state quand elle n’en a pas encore. Seul le serveur écrit cet état, à partir des capteurs, par l’automate d’états de la ressource.

02 · Score

Une contribution par instance hors de son état

pour chaque tâche faite, son délai de grâce passé :
  pour chaque ligne From Instance avec un état attendu :
    si l’instance est sur le terrain et son état ≠ attendu → contribution écart / seuil sur Failing

Le délai de grâce — le terrain dispose d’un moment après la fin de la tâche : un barbecue met du temps à refroidir. Avant la fin de ce délai, la tâche n’est pas jugée.

Le message — chaque contribution porte sur le monde terrain et nomme la tâche, l’instance et les deux états : "Extinguish a barbecue" is done but "Martinez barbecue" is On, not Off. Sans rien à signaler, Failing reçoit 0 de cette stratégie.

03 · Paramètres

Configuration par défaut

Valeurs de getDefaultConfiguration. Aucun formulaire de configuration n’est livré dans supervision-strategy-extensions.json pour cette stratégie : la boîte de supervision permet seulement de la cocher ou de la décocher.

ParamètreCléDéfautSignification
Délai de grâcegrace30Secondes laissées au terrain après la fin de la tâche avant que son état compte.
Écartmismatch1.0Poids d’une instance hors de son état attendu ; à 0 ou moins, rien n’est compté.
Seuilthreshold1.0Somme pondérée à laquelle Failing atteint 1.
04 · Points d’attention

Ce qu’elle ne juge pas

Les états seulement — la valeur de capteur attendue (expectedValue) et la position attendue (expectedPosition) d’une ligne consumes sont lues par la consolidation des connaissances et par la simulation, pas par cette stratégie.

Une instance sans état — sans état courant ni état par défaut, ou absente du terrain, la ligne est ignorée : aucun écart ne peut être établi.