@@ -7,12 +7,12 @@ single_neuron_eqs = [
7
7
D (v) ~ min (max (- 2 - v, v), 2 - v) - w + F, # add the flux term
8
8
D (w) ~ e * (v - g * w + b)
9
9
]
10
- n1 = ODESystem (single_neuron_eqs, t, [v, w, F], [g, e, b], name = :n1 )
11
- n2 = ODESystem (single_neuron_eqs, t, [v, w, F], [g, e, b], name = :n2 )
10
+ n1 = System (single_neuron_eqs, t, [v, w, F], [g, e, b], name = :n1 )
11
+ n2 = System (single_neuron_eqs, t, [v, w, F], [g, e, b], name = :n2 )
12
12
@parameters Di Dk
13
13
connections = [0 ~ n1. F - Di * Dk * max (n1. v - n2. v, 0 )
14
14
0 ~ n2. F - Di * max (n2. v - n1. v, 0 )]
15
- connected = ODESystem (connections, t, [], [Di, Dk], systems = [n1, n2], name = :connected )
15
+ connected = System (connections, t, [], [Di, Dk], systems = [n1, n2], name = :connected )
16
16
connected = complete (connected)
17
17
18
18
u0 = [
@@ -82,7 +82,7 @@ sol = solve(prob, Rodas5P(), dt = 1e-10)
82
82
# https://github.com/SciML/ModelingToolkit.jl/issues/3504
83
83
@variables x (t) y (t)
84
84
@parameters c1 c2
85
- @mtkbuild sys = ODESystem ([D (x) ~ - c1 * x + c2 * y, D (y) ~ c1 * x - c2 * y], t)
85
+ @mtkbuild sys = System ([D (x) ~ - c1 * x + c2 * y, D (y) ~ c1 * x - c2 * y], t)
86
86
prob = ODEProblem (sys, [1.0 , 2.0 ], (0.0 , 1.0 ), [c1 => 1.0 , c2 => 2.0 ])
87
87
@test prob. ps[Initial (x)] ≈ 1.0
88
88
@test prob. ps[Initial (y)] ≈ 2.0
0 commit comments