init_time function

init_time(1)

Returns the time at which this model component first came into existence. This really only has any use for:

- population submodels, so that the model knows when a new member of the population was created; and
- conditional submodels, so that the model knows when the submodel, or one instance of it, came into existence because the condition controlling it became true.

**Input**: numeric. In fact, the argument is not used, so simply insert the number 1. The only reason for having the brackets and an argument enclosed between them is that this is the only way that Simile can recognise that this is a function.

**Result**: numeric

Example:

Let's assume you have a population submodel, and some property of each individual is related to its age (e.g. its growth rate, or its probability of dying). Simply create a variable called age (inside the submodel), and insert the following equation:

age = time(1) - init_time(1)

The result is the difference between the current simulation time (given by the function time(1), and the time when the instance was created, given by init_time(1).

In: Contents >> Working with equations >> Functions >> Built-in functions

- Printer-friendly version
- Log in or register to post comments

## Comments

## No input parameter to

No input parameter to function init_time() is needed in Simile version 5 but brackets are required to let Simile know that it is a function and not a variable that is being referred to.

So the dummy arguement should not be mentioned in the above text. It is accepted for backwards compatibility but is now unneccessary.