Skip to content

Commit f46663d

Browse files
committed
Tests
1 parent 194064e commit f46663d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

test/sdesystem.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ D = Differential(t)
590590
sts = @variables x(t) y(t) z(t)
591591
ps = @parameters σ ρ
592592
@brownian β η
593+
s = 0.001
594+
β *= s
595+
η *= s
593596

594597
eqs = [D(x) ~ σ * (y - x) + x * β,
595598
D(y) ~ x *- z) - y + y * β + x * η,
@@ -601,9 +604,13 @@ drift_eqs = [D(x) ~ σ * (y - x),
601604
D(y) ~ x *- z) - y,
602605
D(z) ~ x * y]
603606

604-
diffusion_eqs = [x 0
605-
y x
606-
(x * z)-z 0]
607+
diffusion_eqs = s * [x 0
608+
y x
609+
(x * z)-z 0]
607610

608611
sys2 = SDESystem(drift_eqs, diffusion_eqs, t, sts, ps, name = :sys1)
609-
sys1 == sys2
612+
@test sys1 == sys2
613+
614+
prob = SDEProblem(sys1, sts .=> [1.0, 0.0, 0.0],
615+
(0.0, 100.0), ps .=> (10.0, 26.0))
616+
@test_nowarn solve(prob, LambaEulerHeun(), seed = 1)

0 commit comments

Comments
 (0)