Skip to content

Commit 871efe7

Browse files
author
Brad Carman
committed
split_parameters tests
1 parent da50105 commit 871efe7

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

test/split_parameters.jl

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ prob = ODEProblem(sys, [], (0.0, t_end), [s.src.data => x])
5050
@test prob.p isa Tuple{Vector{Float64}, Vector{Int}, Vector{Vector{Float64}}}
5151
sol = solve(prob, ImplicitEuler());
5252
@test sol.retcode == ReturnCode.Success
53+
@test sol[y][end] == x[end]
54+
5355

5456
# ------------------------ Mixed Type Converted to float (default behavior)
5557

@@ -76,21 +78,6 @@ prob = ODEProblem(sys, [], tspan, []; tofloat = false)
7678
@test prob.p isa Tuple{Vector{Float64}, Vector{Int64}}
7779
sol = solve(prob, ImplicitEuler());
7880
@test sol.retcode == ReturnCode.Success
79-
sol[states(model)]
80-
81-
# ------------------------- Observables
82-
83-
@named c = Sine(; frequency = 1)
84-
@named absb = Abs(;)
85-
@named int = Integrator(; k = 1)
86-
@named model = ODESystem([
87-
connect(c.output, absb.input),
88-
connect(absb.output, int.input),
89-
],
90-
t,
91-
systems = [int, absb, c])
92-
sys = structural_simplify(model)
93-
prob = ODEProblem(sys, Pair[int.x => 0.0], (0.0, 1.0))
94-
sol = solve(prob, Rodas4())
95-
@test sol.retcode == ReturnCode.Success
96-
sol[absb.output.u]
81+
82+
83+

0 commit comments

Comments
 (0)