Rule engine

Hello everyone, I’m encountering issues with the rule engine that I can’t seem to resolve. Let me illustrate with an example: the first line sets a value equal to 161 (days calculated by summing the previous weeks 161/7= 23 previous operational states).
Operative = 161.0

The second line establishes a value equal to 168 (days calculated by summing the previous weeks 168/7= 24 previous operational states). And so forth…
Operative = 168.0
I arrive at Failure, and the difference in days is 7 (days since the last state change).
Failure = 7.0

Then the operative has 7 days compared to the previous one.
Operative = 7.0

Operative = 14.0

Operative = 21.0

Examples.xlsx (9.4 KB)


here is a possible solution using column expression’s long memory feature. It works with multiple failures as well.

Hope it helps :slight_smile:

Have a nice day,
Raffaello Barri


Hello, thank you for your response. I have updated the expression in the Column expressions node; every time the system undergoes a change of state, the count restarts from 7 units.
Rule engine_.knwf (82.9 KB)

1 Like