You are here

Working with external data : Input parameters

Parameters

The term 'parameter' usually refers to a symbol in an equation that can take on different values. When discussing equations in Simile, we use the term to describe the local names for values from other Simile components. However, here we are talking about quantities that are parameters for the whole model; special components whose values are specified externally and will change from one run to the next as the simulated conditions change. The values for these components come from outside the model; if they have equations, these are only used to set the dimensionality or provide default values.

There are two kinds of parameter that can be used in models. A variable in Simile can be marked as a fixed or variable parameter by ticking the appropriate radio button in the equation dialogue. A compartment can be a fixed parameter (i.e., its initial value is set externally) but not a variable parameter.

Fixed parameter

The value of a fixed parameter is set when the model is ready to run, and can be taken from a file, a table editor, or entered directly. It does not change its value during the simulation. In Simile v6 or lower, any value in the equation is ignored, and used only to set the parameter's dimensions. As of Simile v7, any value in the equation is used as a default if no other has been set.

Variable parameter

The value of a variable parameter is first set when the model is initialized or reset, and it can change throughout the simulation. Values can be taken from a file, a table editor, or using a slider control. The value in the equation is used as a default if no other has been set. If no value is entered, the default is the midpoint between the lower and upper bounds.

Dimensionality

When you are adding file parameters to your model, it is important that they have the right dimensions for the data that they will hold. The file parameter dialogue only allows you to enter data that has the same dimensions as the parameter that is to represent it in the model. A fixed parameter that is not inside a multi-instance submodel will only accept a single numerical value. To enter an array of values, you must first make your parameter an array, either by putting it inside a fixed-membership multi-instance submodel, or by giving it an equation whose result has array dimensions, e.g., by using the makearray(...) function.

See also the 2nd video in the Simile Tutorial Series.

In: Contents >> Working with equations