SciMLBase.jl
SciMLBase.jl copied to clipboard
DAEFunction's observed should get `du`
Currently all the observed function have the signature (sym, u, p [, t]). However, for DAEFunction, our equations in general depend on du, so if we want to move something to observed, du would have to be available. I think it would make sense to change the signature of observed for DAEFunction to take du also. cc @YingboMa
What's a case where the observed variable requires a du to be defined?
I don't think MTK does this right now, but you might have something like:
D(x) ~ f(x)
D(x) ~ z
In that case z can be made observable with z := D(x).
We have now seen this return incorrect observed in the wild. What needs to be done to address this?
We have now seen this return incorrect observed in the wild
That's a different issue. Can you open an issue with an MWE? This issue is about the fact that the du is not necessarily saved or defined (if the interpolation does not exist). There is no way for it to be incorrect if there is nothing computed, so I'd need more information on what you're computing.