Functions and constants
With the help of the Function / Constant shape you can define arbitrary functions or constants, which cannot be implemented with the standard shapes from the library otherwise.
Drag a new Function / Constant shape onto the worksheet and select it.
In the Properties sidebar on the right side of the working area, you can now enter the desired function or constant in the Function field.
Use placeholders of the form ${n}
as input parameters, where {n}
must be an incremental integer number.
Examples
Input |
Description |
---|---|
|
Constant value 4 |
|
Multiplication of the input value with factor 1.5 |
|
Addition of three input values |
|
Arithmetic mean of two input values |
The following functions are available.
Replace the function arguments with either constants, other functions or the placeholder of an input parameter ($1
, $2
etc.).
Function |
Description |
---|---|
|
Absolute value |
|
Arc cosine |
|
Arc sine |
|
Arc tangent |
|
Round up to the next integer value |
|
Cosine |
|
Exponential function (\(e^x\)) |
|
Round down to the next integer value |
|
Logarithm to the base e |
|
The larger value of a and b |
|
The smaller value of a and b |
|
Power function (\(a^b\)) |
|
Random number between 0 and 1 (including 0) |
|
Mathematical rounding to the nearest integer |
|
Sine |
|
Square root |
|
Tangent |
|
Angle conversion from radians to degrees |
|
Angle conversion from degrees to radians |
Furthermore the following operators are supported:
Operator |
Description |
---|---|
|
Opening parenthesis |
|
Closing parenthesis |
|
Addition (for number and strings) |
|
Subtraction |
|
Multiplication |
|
Division |
|
Modulo (remainder of a division) |
|
Unary plus (returns the numeric value of the operand) |
|
Unary minus (returns the negative value of the operand) |
|
Equality |
|
Inequality |
|
Less than |
|
Less than or equal to |
|
Greater than |
|
Greater than or equal to |
|
Logical And |
|
Logical Or |
|
Logical Not |
Warning
Since Avelon always performs the calculation of data points in their SI base unit, the constant or function shape must also provide its values in the corresponding SI base unit. This means that even if you connect the function shape to an energy data point with the unit kWh, it must output its calculation in joules for the calculation to work correctly.