prob = DDEProblem(bc_model, u0, h, tspan; dependent_lags = ((u, p, t) → tau,))

alg = MethodOfSteps(Tsit5())

sol = solve(prob, alg)

if i have lags that are random :within some range i.e ,i want to use random lags for each step the solve function solves. how to put that in the dependent lags.

what would p be (parametes) ,

how would i use the lags in the function function that defines the equations.

Do you still have a DDE? Seems like you have at most an SDDE at that point, if it’s well-defined.

yes it is an SDDE if you say so ,lags are random, yes.

wait i didn’t know sdde is stochastic -delay differential…i thought it is state dependent differential equations,

mine is a delay differential equation itself but with random lags and ,mine isn’t driven by a brownian motion.

i want to know what is the format of writing dependent lags - i need an example please?

i did this

function random_lags()

Random.seed!(time_ns())

return 4 * rand(Float64, (1, 3))

end

p = (a,b,c,d,n,random_lags())

then in the problem :

prob = DDEProblem(model, u0, h, tspan, p;dependent_lags = ((random_lags())->p[end],))

the error :-

LoadError: syntax: “random_lags()” is not a valid function argument name around “file path”

could you help ,what am in doing wrong?

yes, random_lags() is a function not a variable.

```
prob = DDEProblem(model, u0, h, tspan, p;dependent_lags = (((u, p, t) -> p[6],))
```

so i just called the function where i defined the equations and used its values there ,and didn’t use dependent_lags or anything here prob = DDEProblem(model, u0, h, tspan, p) .it works.

Thank you,