Details

This vignette collects together other details for odin that we might want to link from elsewhere.

Order of events

This is only an issue for discrete-time models, as for a continuous time model it is always “now”.

Consider discrete time model that compares to data. There will be some series of “updates” then a comparison to data, then we repeat until we reach the end of the data. The order of events as we move from time = t0 to to time = t0 + dt is:

Update

  1. Reset any variables that use zero_every
  2. Read from variables
  3. Look up interpolation (using t0)
  4. Evaluate all assignments (therefore with time = t0 and all variables having the value at the beginning of the step)
  5. Write out new values of state
  6. Update time to t0 + dt

Compare

  1. Read from variables
  2. Look up interpolation (using t0 + dt)
  3. Compare to data