Skip to content

Functions used in all (or more) formula fields

Available in all formula fields are standard mathematical functions shown in Table 41.

Standard mathematical functions
+ , - , * , / , ^
Abs(Value1)
Arctan(Value1)
Cos(Value1)
Exp(Value1)
Frac(Value1)
Int(Value1)
Trunc(Value1)
Ln(Value1)
Pi
Round(Value1)
Sin(Value1)
Sqr(Value1)
Sqrt(Value1)
Min(Value1;Value2; Value3;….)
Max(Value1;Value2; Value3;….)
Avg(Value1;Value2; Value3;….)
Sum(Value1;Value2; Value3;….)
Other functions
Ceil
Floor
Z
If
(function1[Comparison operator]funtion2)
Year(_), month(_), day(_), hour(_), minute(_)
DayOfWeek(_)
Time series reference

The last functions are described below.

Ceil

Returns an integer value rounding a real number up to nearest integer.

Syntax            Ceil(Value1)

          Argument         Description
          Value1           Real number
          Returning unit   Integer

Example

Ceil(11.5) = 12

Floor

Returns an integer value rounding a real number down to nearest integer.

Syntax            Floor(Value1)

          Argument         Description
          Value1           Real number
          Returning unit   Integer

Example

Floor(11.5) = 11

If

Checks whether an expression is met, and returns one value if TRUE, and another value if FALSE.

Syntax            If(expression;x;y)

          Argument         Description
          expression       Boolean expression to be evaluated
          x y              If expression is TRUE the function returns x
                           If expression is False the function returns y

Example

(T(_)>10;100;50) = if T(_) = 5 then the result is 50

(function1[Comparison operator]function2)

Checks whether an expression is met and returns 1 if TRUE and 0 if FALSE.

Syntax            (function1[Comparison operator]function2)

          Argument               Description
          function1              Expression to be evaluated
          function2              Expression to be evaluated
          Comparison operator    Can be any of the following: =, <>, <, >, <=, >=

Example

(T(_)>10) = if T(_) = 5 then the result is 0

Date and Time functions

With the functions: year(_), month(_) day(_), hour(_), minute(_) you get the year, the number of month in the year, the number of day in the month, the number of hour in the day and the number of minute in the hour, respectively for the given time interval.

DayOfWeek

Returns the number of the day in the week, where Monday is 1 and Sunday is 7.

IsHoliday

Returns 1 if the day is a public holiday, otherwise 0.

Time series reference

Returns values from a time series established under external conditions or demands. Present only available in “Time series functions” and “Production Units”.

Syntax            Symbol(_)

          Argument          Description
          Symbol            Expression to be evaluated
          Returning value   Value corresponding with date and time from time series established
                            under external conditions or demands
          Returning unit    -           

Description

Symbol() is used when the load curve of a production unit is dependent of a time series. The function extract values from the specified time series.

Examples

HD(_) extract the values form the time series HD, where HD is the symbol of a time series, e.g. heat demand.

T(_)extract the values from the time series T, where T could be the symbol of a time series from external conditions describing the fluctuations in temperatures during a year.

Z

Z is a step-function that returns a value between 0 and 1

Syntax            Z(function;Fmin;Fmax)

          Argument            Description
          function            The function, T
          Fmin                Minimum value
          Fmax                Maximum value
          Returning value     Function value between 0 and 1
          Returning unit      -

Description

Z is a step function, that returns the value 0, when T≤Fmin, 1, when T>Tmax, and a linear interpolated value between 0 and 1 when T is between Fmin and Fmax.

Example

Z(T(_);0;10;). Use the time series with the symbol T. The argument to T,- (_) refers the actual time. In that case the Z-function returns:

  • 0 if the actual temperature is zero or below
  • 0.5 if the temperature is 5°C
  • 1 if the temperature is above 10°C