reset.model: resets the model to its initial state.

Description Usage Arguments Value Author(s) Examples

View source: R/clientmmii.R

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

1
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

1
reset.model("dummy_ih", -2)

Simile documentation built on May 2, 2019, 6:52 a.m.