You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a feature request. At the moment, Diffrax only supports two types of events, DiscreteTerminatingEvent and SteadyStateEvent. For many applications (ODEs with collision or reflection, first passage problems for SDEs) it would be very convenient to have an event tracker as in SciPy's scipy.integrate.solve_ivp. This would allow the user to provide a real-valued, continuous function (state, **kwargs) -> float and use a root finder to determine precisely when this function crosses 0. At the moment, DiscreteTerminatingEvent will significantly overshoot the zero-crossing and I have to use additional post-processing. SciPy also allows the user to specify which directionality (i.e. from negative to postive or positive to negative) of a zero-crossing should terminate integration, which is very helpful in practice.
The text was updated successfully, but these errors were encountered:
Regarding this continuous time event feature: Will the output of the ODE/SDE be differentiable wrt. to parameters in the cond_fn of the Event? If one wants to implement this functionality with the current version of diffrax how would you suggest them to proceed?
Thanks for the help :)
This is a feature request. At the moment, Diffrax only supports two types of events,
DiscreteTerminatingEvent
andSteadyStateEvent
. For many applications (ODEs with collision or reflection, first passage problems for SDEs) it would be very convenient to have an event tracker as in SciPy'sscipy.integrate.solve_ivp
. This would allow the user to provide a real-valued, continuous function(state, **kwargs) -> float
and use a root finder to determine precisely when this function crosses 0. At the moment,DiscreteTerminatingEvent
will significantly overshoot the zero-crossing and I have to use additional post-processing. SciPy also allows the user to specify which directionality (i.e. from negative to postive or positive to negative) of a zero-crossing should terminate integration, which is very helpful in practice.The text was updated successfully, but these errors were encountered: