-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ODE that depends nonlinearly on a jump process #885
Comments
Have you seen https://diffeq.sciml.ai/stable/tutorials/discrete_stochastic_example/ and https://diffeq.sciml.ai/stable/tutorials/jump_diffusion/? The |
I have seen that, but it doesn't allow for the ODE to use the jump process. What I want is to solve something of the form where where |
Oh yes, this would require using the random ordinary differential equation (RODE) solvers with a Poisson process. |
I thought about this as well, but according to the documentation, the RODE problems seem to be restricted to the form where |
Apologies if I've misunderstood, but if you just want to have a counting process as an input in the ODE, why not make it an extra state-variable within using DifferentialEquations
function f!(du,u,p,t)
du[1] = 10 - u[2]*u[1]
du[2] = 0
nothing
end
# rate the counting process fires at
rate(u,p,t) = u[1]*u[2] + 1
function affect!(integrator)
# when a jump occurs we increment that value of the counting process by 1
integrator.u[2] += 1
nothing
end
vrj = VariableRateJump(rate, affect!)
oprob = ODEProblem(f!, [100.0, 0.0], (0.0, 10.0))
jprob = JumpProblem(oprob, Direct(), vrj)
sol = solve(jprob, Tsit5()) |
Also, doesn't your general mathematical problem still fit within the jump-ODE form you wrote down above, i.e. just take your combined equation to be choosing |
Ah, yes, you are right. Thank you both for helping to clarify this. |
I need to solve a differential equation that has a nonlinear dependence on a jump process, whose rate is itself dependent on the solution of the ODE. This does seem to be possible with this package; it seems only possible to add a jump process to an ODE. Is there any plan to allow for a more general dependence of an ODE on a jump process than what is currently available?
The text was updated successfully, but these errors were encountered: