SciML / SymbolicIndexingInterface.jl

A general interface for symbolic indexing of SciML objects used in conjunction with Domain-Specific Languages
https://docs.sciml.ai/SymbolicIndexingInterface/stable/
MIT License
15 stars 8 forks source link

Index with non-existing dummy derivative #8

Open baggepinnen opened 1 year ago

baggepinnen commented 1 year ago

MTK often produces "dummy derivative" variables. It would be a handy feature if one could index a solution with such a dummy derivative, even if it's not present in the solution. This need arises due to the fact that MTK can select any state realization it wants, and sometimes dummy derivatives are introduced, sometimes not.

I've figured out that one can index a solution object at a derivative with the syntax sol(0.1, Val{1}, idxs=var) to obtain the derivative of var

If I then want to index the solution with a variable pilot₊drho1ˍt(t) that is not present in the solution, how do I get a handle to the variable pilot₊drho1 so that I can perform this indexing?

Better yet, could the indexing with pilot₊drho1ˍt(t) be made to do this automatically?