-
-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Labels
bugSomething isn't workingSomething isn't working
Description
MWE:
using ModelingToolkit, OrdinaryDiffEq
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters p d
@variables X(t) Y(t)
eqs = [
D(X) ~ p - d*X,
Y ~ X + 1
]
@mtkbuild osys = ODESystem(eqs, t)
u0 = [X => 1.0, Y => 1.0]
tspan = (0.0, 100.0)
ps = [p => 1.0, d => 0.1]
oprob = ODEProblem(osys, u0, tspan, ps)
osol = solve(oprob)
# Yields `ERROR: Incorrect specification of `idxs``
osol(0.0; idxs=(X, Y))
osol(0.0; idxs=(osys.X, osys.Y))
osol(0.0; idxs=(:X, :Y))
# All works
osol[(X, Y)]
osol[(osys.X, osys.Y)]
osol[(:X, :Y)]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working