Skip to content

Commit 36d2b5c

Browse files
add a DAE test
1 parent 87f9276 commit 36d2b5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/lowering_solving.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ModelingToolkit, OrdinaryDiffEq
1+
using ModelingToolkit, OrdinaryDiffEq, Test
22

33
@parameters t σ ρ β
44
@variables x(t) y(t) z(t)
@@ -60,5 +60,5 @@ p = [lorenz1.σ => 10.0,
6060
tspan = (0.0,100.0)
6161
prob = ODEProblem(connected,u0,tspan,p)
6262
sol = solve(prob,Rodas5())
63-
63+
@test maximum(sol[2,:] + sol[6,:] + 2sol[1,:]) < 1e-12
6464
#using Plots; plot(sol,vars=(:α,Symbol(lorenz1.x),Symbol(lorenz2.y)))

0 commit comments

Comments
 (0)