Variables

A variable is a constant or dynamically calculated value and is represented by an oval in the model.

Variables can be useful to synthesize data or supply calibration variables to your model. For instance, in a demographic model, a variable could be created to specify the birth rate. Alternatively, if you have a population model that has multiple age groups, you could dynamically calculate a variable to add up all the age groups and determine the total population size using the following equation (you would have to make sure that the Total Population variable was connected with links to the necessary stocks; see the next section for more information on links):

[Young Population] + [Middle Aged Population] + [Old Population]

Variables can also be used to create forcing functions which are based on the current time. Insight Maker supports a number of functions that return the current time in the specified units. These functions are: seconds, minutes, hours, days, weeks, and years. The following equation could be used to create a variable that returns the square of the current simulation time as measured in hours:

Hours()^2

Sometimes it is hard to decide which parts of your model should be simulated using stocks and which parts with variables. Generally stocks should only be used to model items that have inflows or outflows. If you have a stock in your model without either an inflow or an outflow, it would likely be modeled better with a variable.