Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.
This repository was archived by the owner on May 12, 2026. It is now read-only.

Use applicable? #328

@devmotion

Description

@devmotion

It seems as soon as the concrete values of u0, tspan, and p are known, we can infer whether the provided model is in in-place or out-of-place form (or if it's misspecified) in a straightforward way by checking

applicable(f, rate_prototype(u0, t0), u0, p, t0)

and

applicable(f, u0, p, t0)

where, e.g.,

rate_prototype(u0, t0) = @. u0 * $(inv(oneunit(t0)))

I'm not sure yet if that could be helpful in any way, but at least these checks seem a bit more natural than the current checks on the number of arguments. However, there's no way we can perform these "more sophisticated" checks when the DEFunction or DEProblem is defined initially, since at that time point the input arguments are not known or might not be concrete, respectively.

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