BoundsError trying to solve DDEProblem

It says your tspan is wrong because you didn’t pass it to the problem constructor.

prob = DDEProblem(f, u0, h, tspan, p, canstant_lag = [τ])