Condition Override Function¶
There may be duration during which asset\'s condition alerts may need to be suppressed. When an asset undergoes maintenance, it is expected that user may want to avoid alerting novel behavior detection. Also during discrete processing, alerting asset\'s condition outside of the process stages is of no significance.
In such cases, it is possible to manually override the conditions detected by the models with a user-defined condition. There can be one or more signals used in the function definition and such signals are referred as Controlling Signals.
Note
The Controlling Signals should be a subset of the signals used in the model learn.
The user-defined condition override function supports Javascript ES7 built-in functions and datatypes. The function gets evaluated over the data during Model Evaluation process. The function can either override the condition with a new user-defined condition or return the system-generated condition. The signal values within the function are re-sampled and interpolated values. For categorical signals, values are represented as strings.
Configuring the Function¶
The condition override function can be set on the EVAL flow via REST API.
{
...
"flowType": "EVAL",
"spec": {
"controllingSignals": [
{
"key": "ssssssss",
"name": "Compressor discharge pressure"
}
],
"conditionOverrideFn": "function override(entity,time,condition,signals){return signals['Compressor discharge pressure'].some(r=>r<100)?'shutdown':condition}exports.main=override;"
}
}
For live monitoring, the function can be set on the STARTLIVEMODEL flow via REST API.
{
...
"flowType": "STARTLIVEMODEL",
"spec": {
"controllingSignals": [
{
"key": "ssssssss",
"name": "Compressor discharge pressure"
}
],
"conditionOverrideFn": "function override(entity,time,condition,signals){return signals['Compressor discharge pressure'].some(r=>r<100)?'shutdown':condition}exports.main=override;"
}
}