Skip to content

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

@jonathanfischer97

Description

@jonathanfischer97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions