Allowing simultaneous ContinuousCallback to trigger (DifferentialEquations.jl)

I am working on an application where ContinuousCallbacks are dynamically generated based on a user configuration. Since I have “no control” over these, collisions can and do occur. For example if two of the conditions happen to trigger at an identical time.

In these cases only one of the ContinuousCallback trigger. This is inline with what I would expect from the DiffEqDocs documentation:

For ContinuousCallbacks and VectorContinuousCallbacks, the event times are found by rootfinding and only the first ContinuousCallback or VectorContinuousCallback affect is applied.

Unfortunately, I need all applicable conditions to trigger (in any order).
To work around this, I am considering maintaining my own list of conditions and callbacks to check every other condition manually and call the remaining callbacks when any ContinuousCallback is triggered by the integrator.

This does not seem to be in the spirit of the way the interface was designed and fragile. I am curious if there is a more reasonable approach to achieve this.

Thanks!
-Leon

It’s just not implemented yet.

1 Like