I use EnsembleProblem to calculate 100 trajectories of a sde,why the length of every trajectories are different?
using DifferentialEquations
# Simulate SDE
function f_fn(dx, x, p, t)
ω₀, α, γ, β = p
dx[1] = x[2]
dx[2] = -ω₀*x[1]-α*x[2]-γ*x[1]^2*x[2]-β*x[2]^3
end
function σ_fn(dx, x, p, t)
dx[1] = 0
dx[2] = sqrt(2*pi)*x[1]
end
ω₀ = 1
α = -1
γ = 0.1
β = 0.1
prob = SDEProblem(f_fn,σ_fn, [0.01, 0.01], (0.0, 60), [ω₀, α, γ, β])
ensembleprob = EnsembleProblem(prob)
sol = solve(ensembleprob, EnsembleThreads(), trajectories = 100, tspan=(0.0,60), dt=0.01)