Closed TorkelE closed 1 month ago
@ChrisRackauckas sounds like maybe we should some additional API functions for querying tstops? I think SSAIntegrator going back to your original implementation has always stored them directly instead of inside the opts tuple.
Yeah it probably needs some higher level query function in DiffEqBase.
And the DiffEqCallbacks needs updates.
Yes
Fixing this is a bit more complicated as it seems DiffEqCallbacks currently relies on tstops
being a specific binary heap implementation (which we don't use in JumpProcesses):
So it seems there also needs to be an API function to get an array representation from the tstops
datastructure.
In fact, both OrdinaryDiffEq and DiffEqCallbacks seems to rely on that internal field from DataStructures.jl's heap implementation, which seems like a not so great idea in general.
I don't disagree. Someone just needs to generalize that. The issue is that the heap implementation does not expose the operation that we want here.
Initially an issue from here: https://github.com/SciML/ModelingToolkit.jl/issues/2611
According to Chris "It's an issue with SSAStepper not having integrator.opts.tstops for the callback"
Example:
For ODEs it works fine though: