You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not super noteworthy and hardly something to prioritise (but should at least be recorded), however, it does work for integrators and solutions, so might make sense.
using ModelingToolkit, OrdinaryDiffEq
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters p d
@variablesX(t)
@variablesY(t)
eqs = [
D(X) ~ p - d*X,
D(Y) ~ p - d*Y
]
@mtkbuild sys =ODESystem(eqs, t)
u0 = [X =>1.0, Y =>1.0]
tspan = (0.0, 100.0)
ps = [p =>1.0, d =>0.1]
prob =ODEProblem(sys, u0, tspan, ps)
prob[(X, Y)] # ERROR: Invalid indexing of problem
integrator =init(prob)
integrator[(X, Y)] # Works
sol =solve(prob)
sol[(X, Y)]
The text was updated successfully, but these errors were encountered:
Not super noteworthy and hardly something to prioritise (but should at least be recorded), however, it does work for integrators and solutions, so might make sense.
The text was updated successfully, but these errors were encountered: