Skip to content

Callback/Event support #36

@termi-official

Description

@termi-official

Is your feature request related to a problem? Please describe.

https://docs.sciml.ai/DiffEqDocs/stable/features/callback_functions/

Describe the solution you’d like

I have no clear idea yet.

Describe alternatives you’ve considered

Not supporting callbacks is not an option.

Additional context

There are two big problems to solve.

  1. We need to clearly define which integrator triggers which callback. The minimal problem is an ODE with $d_t u = f(u) = f_1(u) + f_2(u)$ split into two subproblems. From a technical point, there is the outer integrator controlling two subintegrators, one for the ODE using $f_1$ and one for $f_2$. Assuming that both f's are linear and have full rank and we have an event that should reflect the first unknown if it passes 0, i.e. something like $u_1 < 0 => u_1 = -u_1$, then where do we need to enforce this and how often? For example, if one subintegrator triggers an event, does the outer integrator need to trigger it again? Or do we need to skip, for consistency reasons, the events of inner integrator fully and only do callbacks on the outer integrator?

  2. Right now we can technically pass the callbacks into the subintegrators. However, the callback does not have all information, as some unknowns are naturally not visible. For example, if the subintegrator 1 operators on $u_1, u_2$ and subintegrator 2 only on $u_2$, but we want an event to be dependent on $u_1$ for this subintegrator. This is not directly possible right now, as the second subintegrator is (for efficiency reasons) disconnected from u_1. We can have a workaround, where we append additional parameters to the existing parameters of the second subintegrator containing u_1 or some kind of interpolation of it to be specific).

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