The following Calculation nodes represent basic mathematical calculations:
Each node has two inputs. Input requirements differ depending upon the type of node that you are using.
The output of all nodes is a single field, Answer, which represents the result of the calculation.
The Properties window for each node contains the items that are described in the following table.
Item |
Description |
Notes |
---|---|---|
First value |
You can select |
|
Calculation symbol |
The symbol that corresponds with the mathematical calculation that is performed by the node. |
None |
Second value |
The second input value that will be used in the calculation. |
You can select |
Display list |
Determines the label that appears on the node in the policy model. |
This list does not appear if you enter a constant in the corresponding section. |
The following example illustrates how you can use an Add node to add a constant value to a value that is defined by a predecessor node. Consider the following nodes and connection.
In this example, the Add node adds 1 to the value in the Alert Level field of a particular Health Indicator record. The following image shows what the Properties window looks like for the Add node.
Suppose that you want to add reading values to a Health Indicator, but you know that the accuracy of the reading values is +/-10%. You can mitigate misleading results by using a policy to round the reading values down before adding them to a Health Indicator.
Note: You can also round values using the Round node, but the Round node always rounds values to the nearest number. This example describes how you can consistently round down to a nearest number.
Consider the following nodes and connections. In this policy, the Remainder node is used in conjunction with a Subtract node to round the last reading value associated with a Measurement Location down to the nearest ten.
As shown in the following image of the Properties window for the Remainder node, you can use the Remainder node to calculate the amount remaining after the Last Reading value is divided by 10. For example, if the last reading value is 87, the result of the remainder node is 7 (87/10=8 with a remainder of 7).
Then, as shown in the following image of the Properties window for the Subtract node, you can then subtract the remainder from the reading value. The result of this calculation is the reading value rounded down to the nearest ten. Continuing with the previous example, the result of this node is 80 (87-7=80).
Finally, the result of the Subtract node (80) is added to a Health Indicator Value record which is linked to a Health Indicator.
The following table illustrates how the input values that you define for each node correspond to the mathematical calculations performed by the node. This table includes the mathematical calculation and output for each type of node when the first input value is 3 and the second input value is 2, as shown in this example of an Exponent node:
Node Type |
Mathematical Calculation |
Output Value |
---|---|---|
Add |
3+2 |
5 |
Subtract |
3-2 |
1 |
Multiply |
3x2 |
6 |
Divide |
3/2 |
1.5 |
Exponent |
3^2 |
9 |
Remainder | 3%2 | 1 |
The following tables summarize the possible combinations of time-based input values that you can use with Add, Subtract, Multiply, Divide, and Remainder nodes. First Value is the input value defined in the top section of the Properties window, and Second Value is the input value defined in the bottom section of the Properties window.
Add Node
First Value |
Second Value |
Output |
Example |
---|---|---|---|
Timestamp |
Time span |
Timestamp |
1/11/2000 + 10 Days = 1/21/2000 |
Time span |
Timestamp |
Timestamp |
10 Days + 1/11/2000 = 1/21/2000 |
Time span |
Time span |
Time span |
12 Days + 10 Days = 22 Days |
Timestamp |
Timestamp |
Invalid |
N/A |
Subtract Node
First Value |
Second Value |
Output |
Example |
---|---|---|---|
Timestamp |
Time span |
Timestamp |
1/11/2000 - 10 Days = 1/1/2000 |
Time span |
Timestamp |
Invalid |
N/A |
Time span |
Time span |
Time span |
12 Days - 10 Days = 2 Days |
Timestamp |
Timestamp |
Time span |
1/11/2000 - 1/1/2000 = 10 Days |
Multiply Node
First Value |
Second Value |
Output |
Example |
---|---|---|---|
Time span |
Time span |
Invalid |
N/A |
Time span |
Number |
Time span |
10 Days x 5 = 50 Days |
Number |
Time span |
Time span |
5 x 10 Days = 50 Days |
Divide Node
First Value |
Second Value |
Output |
Example |
---|---|---|---|
Time span |
Time span |
Number |
1 day / 8 hours = 3 |
Time span |
Number |
Time span |
1 day / 2 = 12 hours |
Number |
Time span |
Invalid |
N/A |
Remainder Node
First Value |
Second Value |
Output |
Example |
---|---|---|---|
Time span |
Time span |
Time span |
15 Days % 10 Days = 5 Days |
Time span |
Number |
Invalid |
N/A |
Number |
Time span |
Invalid |
N/A |
Copyright © 2018 General Electric Company. All rights reserved.