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
- Reset any variables that use
zero_every
- Read from variables
- Look up interpolation (using
t0
) - Evaluate all assignments (therefore with
time = t0
and all variables having the value at the beginning of the step) - Write out new values of state
- Update
time
tot0 + dt
Compare
- Read from variables
- Look up interpolation (using
t0 + dt
) - Compare to data