Add differentiable event handling
One thing that needs thinking about is how this compares to the use of jump processes as a driving control, which morally speaking do something very similar.
- [x] Discrete terminating events
- [ ] Discrete non-terminating events
- [ ] Continuous terminating events
- [ ] Continuous non-terminating events
The continuous events can be implemented by using the most recent dense_info and performing a nonlinear solve to locate the event location.
With #133 we now have support for discrete terminating events! This provides support for steady-state finding, which is one of the big-ticket items for events.
Hi Patrick, I'm interested in adding support for discrete non-terminating events. Do you have any suggestions on the best way to implement this feature?
Probably I'd suggest adding them here:
https://github.com/patrick-kidger/diffrax/blob/0b93a3c108cff20c201da7b81e141dceff637f4f/diffrax/integrate.py#L228
and then more-or-less just copying the API for the terminating discrete events. (Although I haven't thought that hard about the details.)
I'd be happy to take a PR on this.
What's your use case?
Thanks for your response! Basically, I am just looking to simulate feeding events for a cell culture. So, I'd choose some discrete subset of the integration time horizon and at each of those times, the state would be updated and integration would resume.