teaquest
teaquest

Reputation: 21

How to implement SecondOrderDDEProblem in DifferentialEquations.jl?

for last several days I've been trying to implement SecondOrderDDEProblem() function from package DifferentialEquations.jl, but I'm only getting errors.

Here's a minimal example of what I'm trying to do

using DifferentialEquations

function f(ddu,du,u,h,p,t)
  τ = p
  hist = h(p,t-τ)
  ddu .= 0.1*ones(3,3) .- hist./u
  nothing
end
τ = 0.1
u0 = rand(3,3)
du0 = zeros(3,3)
h = [copy(u0),zero(u0)]
tspan = 1.
prob = SecondOrderDDEProblem(f,du0,u0,h,tspan,p=τ; constant_lags = [τ])

However, I get MethodError: no method matching. It seems there's some error with DynamicalDDEFunction and I don't know why.

Upvotes: 2

Views: 69

Answers (0)

Related Questions