Math Node

A Math node is a Calculation node that you can use in the policy model to perform operations on mathematical expressions. It evaluates the expression that you provide (e.g., a^2+b*c) based on the values defined for its inputs and the mathematical functions and operators used. The resulting value of the expression is returned as the output of the Math node, which can be used in another node in the policy model.

IMPORTANT: The variable name that you may use in your mathematical expression should not be a reserved parsing keyword, which could be a constant or a function in the mathematical language (e.g., cos, e, int, pi, sin, std). When such a variable name is used in an expression, it is treated as the reserved keyword. This may lead to a validation error.

Comparison with R Script Node

For moderately complex calculations, the Math node offers a simpler alternative to the R Script node in that it does not require the knowledge of the R programming language and it runs faster than the R Script node.

Node Properties

The Properties window for a Math node contains items described in the following table:

Item

Description

Note

Math expression

The mathematical expression that needs to be evaluated.

You can select to specify the output of a predecessor node in this section.
Name The variable name that you may have used in the Math expression. This value is case-sensitive, must include only alphanumeric characters, and cannot include spaces.
Value The value of the variable name.

This value must be a number.

You can select to specify the output of a predecessor node in this section.

Adds a new row for Name and Value. Each variable name used in the Math expression must be defined.
Deletes the corresponding row. None.

For full documentation of supported functions and expression syntax, please refer to Math Parser. The Math node implements version 4.1.1 of the math parser library.

Note: User-defined arguments are currently not supported in the Math node.

How Input Values Correspond to Calculations

The following table illustrates how the input values that you define for a Math node correspond to the mathematical operations performed by the node. Here, a and b are variables whose values are 5 and 8 respectively.

Math expression

Output

Note

2+pi

5.1415926536

pi is a mathematical constant.
a!+b 128 This is case-sensitive.
a=b^2 0, if false; 1, if true. ^ is an exponentiation operator.
if(a>b,100,0) 0, if false; 100, if true. > is a relational operator.
sqrt(a+b) 3.6055512755 sqrt is a square root operator.

Example

The following example illustrates how you can use the Math node to evaluate a Math expression.

Consider the following policy model that is designed to provide an email alert when an equipment has exhausted the threshold percentage of its life expectancy.

Policy Model with Math Node

The threshold percentage of life used for the equipment is stored as a Technical Characteristic. The life data of the equipment (e.g., hours for turbine, starts for crane, take-offs for aircraft, tonnes moved for mining equipment), is stored as Measurement Location readings.

The percentage of expected life of the equipment is calculated in the Math node using the Cumulative Distribution Function (CDF) of the Weibull Distribution, which is a mathematical function for analyzing life data.

The Math expression used for this calculation is as follows:

100*(1-e^(-((Time/Eta)^Beta)))

Where:

The following image shows the Properties window of the Math node:

Properties window

To easily identify the Measurement Location, Technical Characteristic, and Weibull Distribution parameters associated with the equipment, the Equipment Entity input node is specified as the primary node, indicating that the record specified for this node is the primary record to which all of the other input records (represented by other Input nodes) will be linked.

The Weibull Distribution Entity input node provides the distribution parameters (i.e., Eta and Beta), which would have been determined in the GE Digital APM Reliability Analytics module by analyzing the failure data of a similar equipment.

The Life Used Measurement Location input node provides the readings to the Recent Reading Last calculation node, which retrieves the latest measurement reading (i.e., Time).

The resulting value of the Math expression is passed to the Cumulative Probability Return Value action node, which will include the value in the policy execution history.

The Life Used Alert Level Entity input node provides the Technical Characteristic value to a comparison condition node, which compares it with the output of the Weibull CDF Math calculation node.

When the Weibull CDF value exceeds the Technical Characteristic value (i.e., the threshold percentage) of the equipment, the message specified in the Email Text calculation node is sent via email to the responsible user specified in the Email Contact action node.

The following image shows the Execution Details window of the Math node:

Execution Details window

Note: You can also build this policy model without the Math node, in which case you will need seven calculation nodes to perform the function of a single Math node.

Note: If the output from a Text or Case node that is used as an input to the Math node is an invalid expression, then the warning messages will not appear on the notification bar. The associated error will be reported during policy validation.

Copyright © 2018 General Electric Company. All rights reserved.