4747 # Checks that the correct steady state is found through ODEProblem.
4848 oprob = ODEProblem (coupled_rs, u0, tspan, ps)
4949 osol = solve (oprob, Vern7 (); abstol = 1e-8 , reltol = 1e-8 )
50- @test osol. u [end ] ≈ [2.0 , 1.0 ]
50+ @test osol[[X,A]] [end ] ≈ [2.0 , 1.0 ]
5151
5252 # Checks that the correct steady state is found through NonlinearProblem.
5353 nlprob = NonlinearProblem (coupled_rs, u0, ps)
5454 nlsol = solve (nlprob; abstol = 1e-8 , reltol = 1e-8 )
55- @test nlsol ≈ [2.0 , 1.0 ]
55+ @test nlsol[[X,A]] ≈ [2.0 , 1.0 ]
5656
5757 # Checks that the correct steady state is found through SteadyStateProblem.
5858 ssprob = SteadyStateProblem (coupled_rs, u0, ps)
5959 sssol = solve (ssprob, DynamicSS (Rosenbrock23 ()); abstol = 1e-8 , reltol = 1e-8 )
60- @test sssol ≈ [2.0 , 1.0 ]
60+ @test sssol[[X,A]] ≈ [2.0 , 1.0 ]
6161end
6262
6363# Checks that coupled systems created via the DSL, extension, and programmatically are identical.
116116 for coupled_rs in [coupled_rs_prog, coupled_rs_extended, coupled_rs_dsl]
117117 oprob = ODEProblem (coupled_rs, u0, tspan, ps)
118118 osol = solve (oprob, Vern7 (); abstol = 1e-8 , reltol = 1e-8 )
119- osol. u [end ] ≈ [10.0 , 10.0 , 11.0 , 11.0 ]
119+ osol[[A,B,X1,X2]] [end ] ≈ [10.0 , 10.0 , 11.0 , 11.0 ]
120120 end
121121end
122122
@@ -158,10 +158,10 @@ let
158158 @test_throws Exception SteadyStateProblem (coupled_rs, u0, ps)
159159
160160 # Checks that the correct steady state is found through ODEProblem.
161- oprob = ODEProblem (coupled_rs, u0, tspan, ps; structural_simplify = true ,
161+ oprob = ODEProblem (coupled_rs, u0, tspan, ps; structural_simplify = true ,
162162 guesses = [A => 1.0 ])
163163 osol = solve (oprob, Rosenbrock23 (); abstol = 1e-8 , reltol = 1e-8 )
164- @test osol. u [end ] ≈ [2.0 , 3.0 ]
164+ @test osol[[X,A]] [end ] ≈ [2.0 , 3.0 ]
165165
166166 # Checks that the correct steady state is found through NonlinearProblem.
167167 u0 = [X => 0.1 , A => 16.1 / 2 ]
@@ -171,10 +171,10 @@ let
171171
172172 # Checks that the correct steady state is found through SteadyStateProblem.
173173 u0 = [X => 0.1 ]
174- ssprob = SteadyStateProblem (coupled_rs, u0, ps; structural_simplify = true ,
174+ ssprob = SteadyStateProblem (coupled_rs, u0, ps; structural_simplify = true ,
175175 guesses = [A => 1.0 ])
176176 sssol = solve (ssprob, DynamicSS (Rosenbrock23 ()); abstol = 1e-8 , reltol = 1e-8 )
177- @test sssol ≈ [2.0 , 3.0 ]
177+ @test sssol[[X,A]] ≈ [2.0 , 3.0 ]
178178end
179179
180180
206206
207207 # Creates and solves a ODE, SteadyState, and Nonlinear problems.
208208 # Success is tested by checking that the same steady state solution is found.
209- oprob = ODEProblem (coupled_rs, u0, (0.0 , 1000.0 ), ps; structural_simplify = true ,
209+ oprob = ODEProblem (coupled_rs, u0, (0.0 , 1000.0 ), ps; structural_simplify = true ,
210210 warn_initialize_determined = false )
211- ssprob = SteadyStateProblem (coupled_rs, u0, ps; structural_simplify = true ,
211+ ssprob = SteadyStateProblem (coupled_rs, u0, ps; structural_simplify = true ,
212212 warn_initialize_determined = false )
213213 nlprob = NonlinearProblem (coupled_rs, u0, ps)
214214 osol = solve (oprob, Rosenbrock23 (); abstol = 1e-8 , reltol = 1e-8 )
@@ -286,15 +286,15 @@ let
286286 @named coupled_rs = ReactionSystem (eqs, τ)
287287 coupled_rs = complete (coupled_rs)
288288
289- # Checks that systems created from coupled reaction systems contain the correct content
289+ # Checks that systems created from coupled reaction systems contain the correct content
290290 osys = convert (ODESystem, coupled_rs)
291291 ssys = convert (SDESystem, coupled_rs)
292292 nlsys = convert (NonlinearSystem, coupled_rs)
293293 initps = Initial .((X, X2, A, B))
294294 fullps = union (initps, [k1, k2, k, b1, b2])
295295 for sys in [coupled_rs, osys, ssys, nlsys]
296296 @test issetequal (parameters (sys), [k1, k2, k, b1, b2])
297- @test issetequal (unknowns (sys), [A, B, X, X2])
297+ @test issetequal (unknowns (sys), [A, B, X, X2])
298298 end
299299end
300300
@@ -1011,7 +1011,7 @@ let
10111011 end
10121012
10131013 # Complicated differential.
1014- @test_throws Exception @eval @reaction_network begin
1014+ @test_throws Exception @eval @reaction_network begin
10151015 @equations V + X^ 2 ~ 1.0 - D (V + log (1 + X))
10161016 d, X --> 0
10171017 end
0 commit comments