0

I have four nodes, that sends numbers between 1 and 10000 to the main-node. The value of every node should be between certain numbers:

$$10 < node1 < 15$$ $$12 < node2 < 45$$ $$50 < node3 < 76$$ $$800 < node4 < 1200$$

Use case 1: Ideal set of nodes, would look like this: $$node1 = 12$$ $$node1 = 15$$ $$node1 = 55$$ $$node1 = 850$$

Use case 2: Non-ideal set would be: $$node1 = 20$$ $$node1 = 15$$ $$node1 = 55$$ $$node1 = 850$$

As you can see, every node, except node1, sends the right values.

Now I want to take the values of all nodes, put into a formula and get a number, that can tell me, if every node has the ideal value or that at least one node is over the range, like in use case 2.

$$IdealMinValue < f(node1, node2, node3, node4) < IdealMaxValue $$ or $$f(node1, node2, node3, node4) \approx IdealValue$$

gola
  • 17

2 Answers2

0

For each node, define a function that returns True if the node is in tolerance and False otherwise. Then take the conjunction of the four. A False for the conjunction means one is out of range.

Ross Millikan
  • 374,822
0

Just a suggestion:-Will delete later if someone comes up with a better function. We know that $(x-a)(x-b) <0$ when $a<x<b$ and $(x-a)(x-b)>0$ for $x$ not in $(a,b)$.Note that $(a,b)$ are min and max values for a particular node. From this you can define a function for every node and have a sort of "boolean function" to check if all the functions return negative values . In this case it will have "True Value" ie all of them are negative otherwise False.