reset.model {Simile}R Documentation

resets the model to its initial state.

Description

A Simile model instance must be reset before it is first run, whenever the parameters are changed, and in order to run it again with new values for random constants.

Usage

reset.model(instance.handle, depth, integration.method, starting.time)

Arguments

instance.handle

The handle returned by create.model(), identifying an executable model instance.

depth

Simile does a sort of 'lazy execution', with values being left untouched if they do not need to be recalculated for a given type of reset. This argument tells it what to reset, with each action including those that follow it:

-2

Recalculate constant atrithmetic expressions including numerals

-1

Recalculate values that depend on fixed parameters

0

Recalculate random constants and set state variables to their initial values

+ve

Recalculate rate variables from the current state values at this time step

integration.method

One of "Euler" or "Runge-Kutta", the latter being 4th-order. Default is "Euler".

starting.time

Value for model time after resetting. Used for indexing time series, time plots etc in the model. Default is 0.

Value

None

Author(s)

Jasper Taylor

Examples

reset.model("dummy_ih", -2)

[Package Simile version 1.3.3 Index]