-
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
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
Labels
No labels