-
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I am trying to move towards an implementation of the Kuramoto oscillator network model with time delays and stochastic forcing. My first attempt here is just a linear SDDE,
using StochasticDelayDiffEq
begin
function f(du,u,h,d,t)
aff = zero(u)
for j=1:length(u)
for i=1:length(u)
aff[i] += h(d, t - d[i,j]; idxs=j)
end
end
du .= -u + 0.1*aff
end
function g(du,u,h,d,t)
du .= 0.1
end
n = 100
h(d,t;idxs=nothing) = idxs==nothing ? (ones(n) .+ t) : (ones(n)[idxs] .+ t);
tspan = (0.,10.)
ic = randn(n)
d = rand(n,n)
end
prob = SDDEProblem(f, g, ic, h, tspan, d; constant_lags = d);
sol = solve(prob,EM(),dt=0.01,progress=true,progress_steps=10)trying this on Julia v1.5 seems to spend several minutes without producing any output. With n=10, the solution is done in a few seconds. This suggests (to me) a super-linear scaling of some delay related data structures internally, and I am curious if I'm not using this the wrong way?
Metadata
Metadata
Assignees
Labels
No labels