Closed duodenum96 closed 1 year ago
As described at https://stackoverflow.com/questions/77195203/kuramoto-model-as-dde-results-dont-converge-when-constant-lags-are-specified, the model is ill-posed so it needs to be fixed to have an actually defined history.
Thanks for the solution. Just writing the following in case anyone has the same problem: turns out the delay matrix has 0s inside it and the constant_lags option on differentialequations doesn't like 0s on constant_lags. The following modification solved the problem:
lags = D_over_v[:]
deleteat!(lags, lags .== 0)
prob = DDEProblem(kuramoto_dde!, theta_0, h, tspan, p; constant_lags = lags)
Hello,
Here is my problem: I am trying to simulate the Kuramoto model with time delays but delays come from a matrix D where ij-th element describes the time delay between oscillator i and oscillator j. Moreover, oscillators are connected with a weighted connectivity matrix C. The model is written as
d(theta_i) / dt = omega_i + K sum_over_j( C[i, j] sin( theta_j(t - D[i, j] - theta_i(t)) )
Where omega_i is the natural frequency and thetas are phases of oscillators
Here is how I coded the function:
The code to run the simulations:
Which gives the following error:
On the other hand, if I don't specify constant lags:
I get the solution but it is very slow. I tried using
constant_lags = D[:]
orconstant_lags = D[:]'
as well but none of them worked. Is there a way to specify constant_lags in this situation without messing up the results?Thanks for the great work with this package (and the sciML ecosystem in general!) Yasir