Skip to content

Commit 22b6fd0

Browse files
committed
Use DAEProblem for actual DAEs
1 parent 3a7bf00 commit 22b6fd0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/components.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,10 @@ u0 = [
130130
inductor2.i => 0.0
131131
inductor2.v => 0.0
132132
]
133-
prob = ODEProblem(sys, u0, (0, 10.0))
134-
sol = solve(prob, Rodas4())
135-
136-
prob = ODAEProblem(sys, u0, (0, 10.0))
137-
sol = solve(prob, Tsit5())
133+
@test_throws Any ODEProblem(sys, u0, (0, 10.0))
134+
@test_throws Any ODAEProblem(sys, u0, (0, 10.0))
135+
prob = DAEProblem(sys, Differential(t).(states(sys)) .=> 0, u0, (0, 0.5))
136+
@test_nowarn sol = solve(prob, DFBDF())
138137

139138
@variables t x1(t) x2(t) x3(t) x4(t)
140139
D = Differential(t)

0 commit comments

Comments
 (0)