Skip to content

Commit 4900dfe

Browse files
Update dae_initialize_integration.jl
1 parent c6e44ee commit 4900dfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/interface/dae_initialize_integration.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ single_neuron_eqs = [
77
D(v) ~ min(max(-2 - v, v), 2 - v) - w + F, # add the flux term
88
D(w) ~ e * (v - g * w + b)
99
]
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)
1212
@parameters Di Dk
1313
connections = [0 ~ n1.F - Di * Dk * max(n1.v - n2.v, 0)
1414
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)
1616
connected = complete(connected)
1717

1818
u0 = [
@@ -82,7 +82,7 @@ sol = solve(prob, Rodas5P(), dt = 1e-10)
8282
# https://github.com/SciML/ModelingToolkit.jl/issues/3504
8383
@variables x(t) y(t)
8484
@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)
8686
prob = ODEProblem(sys, [1.0, 2.0], (0.0, 1.0), [c1 => 1.0, c2 => 2.0])
8787
@test prob.ps[Initial(x)] 1.0
8888
@test prob.ps[Initial(y)] 2.0

0 commit comments

Comments
 (0)