Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

UserSimple

Input

The input of the user defined function can be a variable which references to a time series set or a variable which references to a coefficient set. In the example below X1 is a reference to a time series set and

b and a are references to a coefficient setIt is possible to define embedded variables in this transformation. In the expression both embedded variables and variables defined at the start of the transformations configuration file can be used. If an embedded variable and a variable defined at the start of the transformations configuration file have the same variableId, then the embedded variable will be used.

Expression

For instance "X1 + X2 * 3". In the expression reference input variables or coefficients using their id, e.g. "X1 + a" where "X1" is the variableId of a variable defined elsewhere and "a" is the id of a coefficient defined in a coefficientSet. A variableId or coefficientId should not start with a numerical character and should not contain operators. The following operators can be used in the expression: +, -, /, *, ^, sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, asinh, acosh, atanh, log, ln, exp, sqrt, abs, pow. "pi" in lowercase letters is recognised as a standard constant. This means that the user cannot use variables or coefficients with id "pi".

...

Function specified by a custom free format expression and coefficients. Any number of input variables and coefficients can be used in the free format expression. The expression may contain general mathematical operators. A function parser is used to evaluate the expression. For each time step in the output time series the expression is evaluated and the result is written to the output time series.

Configuration example

In the example below 'X1' is a reference to a variable and 'a' and 'b' are references to a coefficient.