I was wondering if anyone knew about how to handle events when using one of the ode integrators such as integrate_ode_bdf in stan?
In many (all?) environments, ode solvers do not test conditions in the specified function at all times (this is related to algorithm efficiency), hence you cannot simply add an event via a condition in the function (e.g. at time t=300, change variable X value to 0.0).
There are ways of handling this. For instance in deSolve in r, you can define events that you then feed to the solver.
I cannot find information about this topic in STAN online. This is the closest I gan get to the topic, and I still do not understand if/how this should be handled in STAN.
Events is really something we use all the times in our models and would be a shame if there wasnt a way of handling them in STAN. Please let me if you have some insight about that