GoldSim provides a wide variety of built-in functions that can be used in expressions. These functions can be typed in directly, or inserted using the context menu of an input field:
The functions are divided into eight categories (two of the categories only appear under certain circumstances):
1. Trigonometry functions, such as sine and cosine;
2. Math functions, such as square root and logarithm;
3. Special functions, such as the Bessel function and "if,then,else";
4. Financial functions, such as present value and future value;
5. Date functions, which are specialized functions for manipulating variables that represent dates and times (e.g., extracting the day of the month from a date, determining if the simulated year is a leap year);
6. Table functions, which are specialized functions for operatibg on Lookup Table elements (this category only exists if at least one Lookup Table element exists in the model);
7. Time Series functions, which are specialized functions for operating on Time Series elements (this category only exists if at least one Time Series element exists in the model); and
8. Array operators, which are specialized functions that operate only on vectors and matrices.
An example of the use of a built-in function is shown below:
The “max” function, shown above in the Equation field, returns the maximum of a list of arguments.
The arguments to a built-in function are enclosed in parentheses, and if there are multiple arguments, they are separated by commas. The arguments to the built-in functions can be links, constants or expressions, but typically must meet certain requirements (e.g., the arguments to a “max” must all share the same dimensions). The first seven categories of functions (and any requirements imposed on their arguments) are summarized in the topics listed below.
Learn more about: