SciML / JumpProcesses.jl

Build and simulate jump equations like Gillespie simulations and jump diffusions with constant and state-dependent rates and mix with differential equations and scientific machine learning (SciML)
https://docs.sciml.ai/JumpProcesses/stable/
Other
140 stars 35 forks source link

Plotting is misleading when not saving all jumps #206

Closed isaacsas closed 2 months ago

isaacsas commented 3 years ago

If we aren't saving all jumps, it seems like we shouldn't use a piecewise-constant curve. Maybe a straight piecewise linear plot would make more sense?

isaacsas commented 2 months ago

@ChrisRackauckas would a reasonable way to handle this be to not set constant interpolation here: https://github.com/SciML/JumpProcesses.jl/blob/4d82cef7b6ce6bc9abbdcf716bd12b9b62c16b15/src/SSA_stepper.jl#L189 when we detect we aren't saving at all times?

isaacsas commented 2 months ago

I guess setting linear interpolation or such instead?

ChrisRackauckas commented 2 months ago

Yeah we could set that to LinearInterpolation, though it would be a type instability in the output.