Incorporating time lag in observation models

indexing the solution object accesses it at discrete timesteps.
I think what you want here is to interpolate your solution at arbitrary time steps, which can be done by calling (parantheses instead of square brackets) the solution object:

predicted(i - τ)

see here how to handle the solution object in various ways:
https://diffeq.sciml.ai/latest/tutorials/ode_example/#Handling-the-Solution-Type

however you’ll probably still have to make sure that i - τ is within bounds.

1 Like