Function wodinRunDiscrete

  • 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 as time = step * dt. So if we know what dt is then we can work directly in terms of "time" in the interface and obscure steps a bit. So here you need to provide timeStart, timeEnd and dt 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, if dt 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. If dt 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.

    Parameters

    • Model: DustModelConstructable

      The model constructor

    • pars: UserType

      Parameters to set into the model on construction

    • timeStart: number

      The starting step (often 0)

    • timeEnd: number

      The finishing step, greater than zero

    • dt: number

      The size of each step

    • nParticles: number

      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.

    Returns FilteredDiscreteSolution

Generated using TypeDoc