Calculator
The calculator allows a variety of calculations, which can include time series as well as numerical values (dimensionless or with units). The method can be called by the menu entries Methods → Calculation with time series → Calculator (see following figure) or the key combination <Ctrl>+<Shift>+<C>.
The Calculator window opens, which consists of the three main areas Command, Symbol Table, and Add Time Series to Symbol Table (see following figure).
In the Command area, you enter instructions that are implemented by clicking the Execute button at the bottom left.
In the Add Time Series to Symbol Table area, you assign symbols to time series.
The Symbol Table area contains all symbols that have been defined so far, and – in brackets – their type (e.g., Time series, Number). If the symbol was defined using Add Time Series to Symbol Table, the name of the time series is specified for each symbol. If the symbol was defined with a command, the command is specified. The unit, if existing, for time series and numbers is displayed in square brackets (see following figure).
Definition of Symbols
The Calculator method can only calculate with variables (symbols). These must be defined before use. There are two ways to do this.
You can assign a time series to a symbol using the dropdown list in the Add Time Series to Symbol Table area.
a := 3 assigns the value 3 to the symbol a.
b := 24[h] assigns a duration of 24 h to b.
c := 3[h]*2[kW] calculates the value 6 kWh for c.
d := a*b only works if a and b are already defined, and assigns d 72 h for the values of a and b above.
The names of the symbols may only contain the following characters (in any order and number):
Lowercase letters: a, b, c, …, z,
Uppercase letters: A, B, C, …, Z,
Digits: 0, 1, 2, …, 9,
Underscore: _.
a := 2*a does not work!
Predefined Symbols
The following symbols are predefined for the calculator. They include logarithms, the exponential function, and trigonometric functions, each of which accepts a dimensionless number as an argument. The application to time series and numbers with units is not possible, not even to time series without units. These symbols must not be redefined.
| Symbol | Description | Application |
|---|---|---|
| sin | calculates the sine of a dimensionless number | sin(3) |
| cos | calculates the cosine of a dimensionless number | cos(2) |
| tan | calculates the tangent of a dimensionless number | tan(7) |
| sinh | calculates the hyperbolic sine of a dimensionless number | sinh(3) |
| cosh | calculates the hyperbolic cosine of a dimensionless number | cosh(1) |
| tanh | calculates the tangent hyperbolicus of a dimensionless number | tanh(-3) |
| asin | calculates the arc sine of a dimensionless number | asin(3) |
| acos | calculates the arc cosine of a dimensionless number | acos(-2) |
| atan | calculates the arc tangent of a dimensionless number | atan(5) |
| ln | calculates the natural logarithm of a dimensionless number | ln(2,5) |
| log | calculates the decadal logarithm of a dimensionless number | log(10) |
| exp | calculates the exponential function of a dimensionless number | exp(2) |
Input of Commands
A semicolon ; separates several commands from each other.
Mathematical Operations
The four basic arithmetic operations are defined in the method for both time series and numbers. Two numbers or two time series can be offset against each other.
Addition/Subtraction
In these two operations, all operands involved must have the same unit or at least units that can be converted into each other. If this condition is fulfilled, an addition or subtraction of a time series and a number can also take place. In this case, the values of the time series are shifted.
Multiplication/Division
Time series can also be multiplied by numbers or divided by numbers. The multiplication/division with dimensionless numbers works like a simple scaling: the unit of the time series is preserved. If a number with a unit is used for calculation, the unit of the result time series also changes.
Exponentiation
Exponentiation is also possible with the operator ^ outside the use of exp(x)(= ex), which uses the exponential function. The exponent can be any dimensionless floating point number, as long as the base also has no unit. If the base has a unit, e.g., 3 [m], the exponent may only be selected from the natural numbers. Exponentiation with time series does not work.
3[m]!^3 yields res := 27 [m^3] (res stands for resulting, the result).
Creating Time Series
In the ETA, you can continue to use time series calculated in the calculator. To do this, select the time series in the Symbol Table and then click Create Time Series. This creates temporary time series that can be processed further. The time series are named like the symbols to which the calculations are assigned.
The following dialog indicates this.
In the following example, the two electricity demands A (Power Demand 1) and B (Power Demand 2) are added up first. A ten percent increase is then calculated on the calculated total electricity demand a. The result is c. In the symbol table, c is selected and the time series is created from it. This time series is displayed in the Project Explorer, in the Plot Window, and in the Data Grid.







