Skip to content

Commit 1c091d4

Browse files
committed
Tests
1 parent f006d57 commit 1c091d4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/reduction.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,20 @@ dt = ModelingToolkit.value(ModelingToolkit.derivative(eq.rhs, sin(10t)))
281281
@test dv25 0.3
282282
@test ddv25 == 0.005
283283
@test dt == -0.1
284+
285+
# Don't reduce inputs
286+
@parameters t σ ρ β
287+
@variables x(t) y(t) z(t) [input=true] a(t) u(t) F(t)
288+
D = Differential(t)
289+
290+
eqs = [
291+
D(x) ~ σ*(y-x)
292+
D(y) ~ x*-z)-y + β
293+
0 ~ z - x + y
294+
0 ~ a + z
295+
u ~ z + a
296+
]
297+
298+
lorenz1 = ODESystem(eqs,t,name=:lorenz1)
299+
lorenz1_reduced = structural_simplify(lorenz1)
300+
@test z in Set(states(lorenz1_reduced))

0 commit comments

Comments
 (0)