Skip to content

Nested LabelledArray for DiffEq #94

@JinraeKim

Description

@JinraeKim

I'm trying to find a way to use a "nested LabelledArray" for *DiffEq.

For example, the following code is what I wanted.

    xa = @LArray [1, 2] (:x, :y)
    xb = @LArray [3, 4] (:z, :w)
    x = @LArray [xa, xb] (:a, :b)
    dynamics = function (dx, x, p, t)
        dx.a = -x.a
        dx.b = -x.b
    end
    tspan = (0.0, 1.0)
    prob = ODEProblem(dynamics, x, tspan)
    sol = @time solve(prob, Tsit5())

However, it does not work since x is not an Array of Numbers.
The nested LabelledArray would be very helpful when dealing with dynamical equations of nested and complicated systems, e.g., multi-agent and interactive simulation.

Any thoughts?

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