Skip to content

Commit 5731e93

Browse files
committed
Add test
1 parent e0d089c commit 5731e93

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/reduction.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,3 +244,14 @@ eqs = [D(x) ~ σ * (y - x)
244244
lorenz1 = ODESystem(eqs, t, name = :lorenz1)
245245
lorenz1_reduced = structural_simplify(lorenz1)
246246
@test z in Set(parameters(lorenz1_reduced))
247+
248+
# MWE for #1722
249+
@variables t
250+
vars = @variables a(t) w(t) phi(t)
251+
eqs = [a ~ D(w)
252+
w ~ D(phi)
253+
w ~ sin(t)]
254+
@named sys = ODESystem(eqs, t, vars, [])
255+
ss = alias_elimination(sys)
256+
@test equations(ss) == [0 ~ D(D(phi)) - a, 0 ~ sin(t) - D(phi)]
257+
@test observed(ss) == [w ~ D(phi)]

0 commit comments

Comments
 (0)