Skip to content

Commit 3b66f8c

Browse files
committed
Symbolic arrays are just broken
1 parent a24a764 commit 3b66f8c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/odesystem.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,13 @@ end
589589
let
590590
@parameters t
591591
D = Differential(t)
592-
@variables x(t)[1:2] = zeros(2)
592+
x = map(xx -> xx(t), Symbolics.variables(:x, 1:2, T = SymbolicUtils.FnType))
593593
@variables y(t) = 0
594594
@parameters k = 1
595595
eqs = [D(x[1]) ~ x[2]
596596
D(x[2]) ~ -x[1] - 0.5 * x[2] + k
597597
y ~ 0.9 * x[1] + x[2]]
598-
@named sys = ODESystem(eqs, t, vcat(x, [y]), [k])
598+
@named sys = ODESystem(eqs, t, vcat(x, [y]), [k], defaults = Dict(x .=> 0))
599599
sys = structural_simplify(sys)
600600

601601
u0 = [0.5, 0]

0 commit comments

Comments
 (0)