So I see this example, which is very useful and resolves how to simulate a DDAE.
I still don’t know how to simulate a PID controller which requires an integral term. The example above has a constant lag, and I’d be looking to compute an integral/sum over a fixed window of time into the past.
I can do this by sampling at a discrete number of constant lag points, but my solver is already relatively slow, and I was wondering if there is a more elegant way solving the problem
I used the example of the SIR model I linked above and a vector of constant lags summed over like in this example
I am not sure what you mean by Ix = Integral(x). I searched in the DifferentialEquations docs and github page and can’t find anything like that. The closest thing I found was Integrals.jl, but it doesn’t seem to have any examples that use DEs.
If you meant something specitic, then I would appreciate clarification. Otherwise, I have a working solution now.