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

`FunctionMap` not defined #423

Closed TorkelE closed 4 months ago

TorkelE commented 4 months ago

Probably working as intended but:

using JumpProcesses
SSAStepper() # Works
FunctionMap() # Not defined

Does JumpPrcoesses export any solvers more than SSAStepper, or is this the only one?

ChrisRackauckas commented 4 months ago

That's the only one contained in JumpProcesses.jl

TorkelE commented 4 months ago

Any reason it is not used as the default choice in that case? If you build a JumpProblem on an ODEProblem or a SDEProblem it doesn't make sense, but I think DiscreteProblem is basically the one people use. It should also be easy to detect what problem was provided to JumpProblem and use that to determine if a default can (or cannot) be selected.

isaacsas commented 4 months ago

I’m going to close this as FunctionMap is not part of JumpProcesses and there is already one or more issues about default solver selection.

ChrisRackauckas commented 4 months ago

It's implemented as part of OrdinaryDiffEq using its infrastructure so that callbacks are fully supported. It's pretty tied to its internals.

TorkelE commented 4 months ago

Makes sense. I was writing the section on designation of solver for jump simulations, and was trying to figure out if there was an alternative one (to SSAStepper) that I could use for the example. I will just import OrdinaryDiffEq and use FunctionMap.

isaacsas commented 4 months ago

Use SSAStepper for a pure jump simulation. It is much faster and designed for such simulations. There is no reason to use FunctionMap.

TorkelE commented 4 months ago

So right now I sue SSAStepper for everything. But at the end of the Jump simulation tutorial I wanted to have a bit on how to select jump simulation solver, and wanted an example with another solver one could use in place of SSAStepper. That's where FunctionMap came into the picture (although the only reason to use it seems to be continuous callbacks, but given that continuous events do not work, I am not sure about the callbacks).

I could also remove the section, and say that while you technically could change the solver, it is related to other functionality, and that they should always use SSAStepper.