Skip to content

Commit 3b63f82

Browse files
test: test observed equations are retained after simplifying SDESystem
1 parent 56a9bb3 commit 3b63f82

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/dde.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,13 @@ prob = SDDEProblem(hayes_modelf, hayes_modelg, [1.0], h, tspan, pmul;
7676
constant_lags = (pmul[1],));
7777
sol = solve(prob, RKMil(), seed = 100)
7878

79-
@variables x(..)
79+
@variables x(..) delx(t)
8080
@parameters a=-4.0 b=-2.0 c=10.0 α=-1.3 β=-1.2 γ=1.1
8181
@brownian η
8282
τ = 1.0
83-
eqs = [D(x(t)) ~ a * x(t) + b * x(t - τ) + c +* x(t) + γ) * η]
83+
eqs = [D(x(t)) ~ a * x(t) + b * x(t - τ) + c +* x(t) + γ) * η, delx ~ x(t - τ)]
8484
@mtkbuild sys = System(eqs, t)
85+
@test ModelingToolkit.has_observed_with_lhs(sys, delx)
8586
@test ModelingToolkit.is_dde(sys)
8687
@test !is_markovian(sys)
8788
@test equations(sys) == [D(x(t)) ~ a * x(t) + b * x(t - τ) + c]

0 commit comments

Comments
 (0)