Hi everybody,
first of all let me say that I still consider myself new to Julia (and even programming in general), so everything I say and write is likely to contain very naive mistakes. Also, if there is anything I should improve regarding how to post/ask questions, please let me know.
I will first write my final goal, just in case I am approaching it from a completely wrong/super inefficient angle and you know a better way to do it. After that I will write my actual question, which is (I think) much simpler and concerns basic usage of the DifferentialEquations.jl package.
Goal: simulate a system of coupled SDEs, let’s say 2N, driven by N complex Brownian motions. The first N equations are driven by the N complex Brownian motions, the second N equations are driven by the conjugate of the N Brownian motions.
Strategy: implement a custom noise using DiffEqNoiseProcess.jl. In particular, I want to construct a NoiseTransport process and then use it to drive my system of SDEs.
Problem: I don’t seem to be able to follow the instructions of the documentation. I link below the sections I read the most, but of course I tried to at least skim through all what seemed to be relevant.
DiffEqNoiseProcess.NoiseTransport
Stochastic Differential Equations
It seems that when it comes to using a NoiseTransport noise, I am not able to implement even a simple Brownian motion. Of course in this case I could just set up my problem as explained by the general tutorial of DifferentialEquations.jl (without the need of DiffEqNoiseProcess.jl), since Brownian motion is already the default noise of SDEProblem(…). The point here is that I am trying to implement the easiest nontrivial NoiseTranport noise I can think of.
Minimal (not working) example:
using DifferentialEquations
function f(u,p,t,rv)
rv
end
t0 = 0.0
T = 10
u0 = 0.0
W = NoiseTransport(t0, f, randn)
function drift(u,p,t)
0
end
function diffusion(u,p,t)
1
end
my_prob = SDEProblem(drift, diffusion, u0, (t0,T), noise = W)
my_sol = solve(my_prob)
but the values of the solution my_sol are simply zero for all time points.
I hope some of you can point out what I am making wrong.
I am sure I am missing something very obvious, so I apologize in advance.
Thanks,
Damiano