The model constructor
Parameters to set into the model on construction
The starting step (often 0)
The finishing step, greater than zero
The size of each step
The number of independent particles (replicates) to run
Optional
summary: SummaryRule[]An array of summary rules to apply over stochastic traces. Defaults to just the mean.
Generated using TypeDoc
Run a discrete time model for wodin. The basic idea here is that we will run some number of replicate simulations forward in time and immediately summarise these in a way that Wodin can use.
There is some sleight of hand here with time that currently copies the behaviour from the shiny app. The discrete time models don't really have a concept of time, they just have "steps", and there is a time variable (
time
in most of the short course/MSc models) which is defined astime = step * dt
. So if we know whatdt
is then we can work directly in terms of "time" in the interface and obscure steps a bit. So here you need to providetimeStart
,timeEnd
anddt
from which we can arrange a suitable range of steps to run the model, then return things in terms of this scaled time. For example, ifdt
was 0.1 and you ran the model from time 0 to 50 we would return 501 points (steps 0, 1, ..., 499, 500) corresponding to times 0.0, 0.1, 49.9, 50.0. Ifdt
is not the inverse of a natural number this will behave poorly but practically that's not a big deal because the course organisers bake dt into the fixed code.