Computing Outputs Using Function Elements

Lesson 2, page 5 of 12

Function elements The basic building blocks with which a GoldSim model is constructed. Each element represents a feature, pararamer, process or event in the model. compute outputs as a function of one or more specified inputs. Each type of Function element carries out a different kind of computation.

Expression elements are the most general type of Function element:

Expression elements produce a single output by calculating user-specified formulas, such as 2 + 3, A*B, or sqrt(55). Similar to a cell in a spreadsheet, when defining an Expression, you can use a wide variety of mathematical operators and functions. You can even use conditional operators (e.g., >,<, =) and "if, then" logic to define Expressions.

Other function elements have predefined functionality. For example, Sum elements sum a list of inputs, and Extrema elements record the highest (or lowest) value of a variable observed during a simulation: