You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make sure that I understood the doc correctly, I decided to make a minimal example only based on code found in the documentation. I wanted to make a stochastic version of the Lorentz 3 model, using a transport noise process. This is, however, identical to the noise-free Lorentz model, because the transport process as defined in the doc always returns 0.0.
Minimal Reproducible Example 👇
using DifferentialEquations
using Plots
using Random
using Random: randn!
# taken from the first examples about SDE in the doc (https://docs.sciml.ai/DiffEqDocs/stable/tutorials/sde_example/#Example-1:-Scalar-SDEs)functionlorenz(du, u, p, t)
du[1] =10.0(u[2] - u[1])
du[2] = u[1] * (28.0- u[3]) - u[2]
du[3] = u[1] * u[2] - (8/3) * u[3]
endfunctionσ_lorenz(du, u, p, t)
du[1] =5.0
du[2] =5.0
du[3] =5.0end#taken from the doc about abstract noise processesfunctionf!(out, u, p, t, v)
println(v) # to check if noise is generated correctly
out[1] =sin(v[1] * t)
out[2] =sin(t + v[2])
out[3] =cos(t) * v[1] +sin(t) * v[2]
nothingend
t0 =0.0RV!(v) = (v[1] =randn(1); v[2] =rand(1))
rv =zeros(2)
W =NoiseTransport(t0, f!, RV!, rv, noise_prototype =zeros(3))
#solving
prob_sde_lorenz =SDEProblem(lorenz, σ_lorenz, [1.0, 0.0, 0.0], (0.0, 10.0), noise = W)
sol =solve(prob_sde_lorenz)
plot(sol, idxs = (1, 2, 3))
The print statement, which I would expect to return a different value at each iteration only outputs 0.
Environment (please complete the following information):
Describe the bug 🐞
To make sure that I understood the doc correctly, I decided to make a minimal example only based on code found in the documentation. I wanted to make a stochastic version of the Lorentz 3 model, using a transport noise process. This is, however, identical to the noise-free Lorentz model, because the transport process as defined in the doc always returns 0.0.
Minimal Reproducible Example 👇
The print statement, which I would expect to return a different value at each iteration only outputs 0.
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
The text was updated successfully, but these errors were encountered: