Model diagram elements : Variable

Variable

How to add a Variable symbol

See Adding node-type elements.

Interpretation

A variable is used to hold one or more values. The value or values come from a mathematical expression. The expression may simply be a number, or it may be a complex mathematical expression involving various variables, operators (such as + and -), functions (such as log or square root), and conditional elements. The value of a variable may vary during the course of a simulation, if it is calculated from other parts of the model that change over time, or it may be constant.

The term "variable" is used to refer to a specific type of model element. This single element can be used for a wide variety of purposes, each of which is referred to in a different way by some modellers. There is rich potential for confusion here, so the following table sets out the correspondence between how a Simile variable is used in a model, and how a modeller would interpret that use. (In case you are wondering why we don't have a number of model elements, one for each type of use: the answer is that this would lead to an unnecessary proliferation of element types. Also, you might wish to change the role of a variable as you build up a model, and you would not want to have to keep on deleting one symbol and replacing it by another.)

Modelling use

Set-up of "variable"

Parameter (a coefficient in an equation): e.g. the reproductive rate per individual animal. Could also be a site constant: e.g. elevation above sea level. Its value will remain constant throughout a simulation run.

No influence arrows pointing to it.

One or more influence arrows pointing from it.

Value is a numeric constant or value is not supplied and "Fixed parameter" radio button is selected.

Input lever: a slider control can be generated for each such variable, and the user can modify its value during the course of a simulation run by moving the slider left or right.

No influence arrows pointing to it.

One or more influence arrows pointing from it.

Value is a numeric constant (representing initial slider position).

"Variable parameter" radio button is selected.

Exogenous variable: this is a variable whose value changes during a simulation run, and which influences the value of other variables, but which is not itself influenced by other variables. Typically used for climatic inputs, such as temperature or rainfall.

No influence arrows pointing to it.

One or more influence arrows pointing from it.

Value is some function of simulation time (i.e. involves the built-in function time).

Intermediate variable, also referred to as a derived variable

One or more influence arrows pointing to it.

One or more influence arrows pointing from it

Value is a function of the variables influencing it and also possibly of model properties such as current time

Output variable: typically, this is used to report on some aspect of model behaviour (e.g. the ratio of two compartments).

No influence arrows pointing from it.

Otherwise as intermediate variable

Attribute of an object: there is only sense in doing this if the variable is inside a multiple-instance submodel, with different instances having different values. E.g. the x-coordinate or the species type of each of many trees.

No influence arrows pointing to it.

No influence arrows pointing from it.

Rules

  • A variable symbol may have zero or more influence arrows pointing to it.
  • A variable cannot have influence arrows pointing to it if it is a "file parameter".
  • A variable symbol may have zero or more influence arrows pointing from it.
  • A variable may not have other kinds of arrow pointing to or from it.

In : Contents >> Graphical Modelling >> ​System Dynamics