Closed benmcdonough20 closed 11 months ago
I'm going to move this to JumpProcesses since it appears to be another issue with the ExtendedJumpArray
interface needing custom dispatches (as we also see in https://github.com/SciML/JumpProcesses.jl/issues/321).
If you think you have a fix via adding a custom dispatch for ExtendedJumpArrays
, a PR that adds it to JumpProcesses in
https://github.com/SciML/JumpProcesses.jl/blob/master/src/extended_jump_array.jl
with a test would be very much appreciated!
This problem seems to regard several parts of the
DifferentialEquations.jl
ecosystem, so I hope this is the right place to post it!An error is thrown when an
EnsembleProblem
is created using aJumpProblem
which includes aVariableRateJump
and thesaveat
keyword is specified. Here is a minimum working example (using the base problem from the documentation here:Here is the stack trace: (pastebin)
The issue appears to be that
JumpProcesses
keeps up with the variable rate by appending the rates to the existing solution to create anExtendedJumpArray
. The problem only appears whensaveat
is specified because the integrator tried to interpolate to time in between the timesteps, and theinterpolate
method returns theExtendedJumpArray
and attempts to save it alongside the raw solution in an output array. I was able to implement a hack-ish fix by manually type checking and replacing thecopyat_or_push!
method here:https://github.com/SciML/OrdinaryDiffEq.jl/blob/f56981814afbc058a95471d2f1b8ac7abdb8ff41/src/integrators/integrator_utils.jl#LL69C9-L75C84
I am new to Julia, so please let me know if I can provide more info!