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
using ModelingToolkit, OrdinaryDiffEq, Test
using ModelingToolkit: t_nounits as t, D_nounits as D
vars =@variablesx(t)
pars =@parameters x0
@named S =ODESystem([D(x) ~0.0], t, vars, pars; defaults = [x => x0])
S =structural_simplify(S)
prob =ODEProblem(S, [], (0.0, 1.0), [x0 =>1.0])
sol =solve(prob)
sol[x][begin] # works
sol[x0*2] # works
sol[x0] # fails
fails with
ERROR: Indexing with parameters is deprecated. Use `getp(A, x0)` for parameter indexing.
I think that if indexing by x0*2 works, then so should x0.
The text was updated successfully, but these errors were encountered:
The last line in
fails with
I think that if indexing by
x0*2
works, then so shouldx0
.The text was updated successfully, but these errors were encountered: