Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow symbolic indices to be passed to the save_idxs kwarg of solve #1036

Open
jonathanfischer97 opened this issue Jun 6, 2024 · 1 comment

Comments

@jonathanfischer97
Copy link

Can't use symbolic indices to parameterize solve(;save_idxs = ...)

  • Often I want to just save an observed variable when solving an ODEProblem, to save on memory during large batch solves.
  • Currently that isn't possible because the observed variable is rightfully not included within u, but computed lazily via the solution.
    • Resorted to defining my own tedious save_func(u, t, integrator) callback, forcing me to redefine my observable equations in terms of u[idx].
  • If I still want to symbolically index the ODESolution for my observed variable, I have to save all of the variables during solve, which is a lot of waste for larger systems.

Would be nice to be able to pass in symbols to solve to be saved, like solve(odeprob, alg; save_idxs = [:obs, ...]

Basically, I'd like solve to handle symbolic indices from an ODESystem just like remake and solution indexing already do.

@ChrisRackauckas
Copy link
Member

Yes this is a current known limitation of the symbolic indexing. It will take a bit of work to fix but it's in the plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants