@@ -13,6 +13,7 @@ rng = StableRNG(12345)
13
13
# Checks that bifurcation diagrams can be computed for systems with conservation laws.
14
14
# Checks that bifurcation diagrams can be computed for systems with default values.
15
15
# Checks that bifurcation diagrams can be computed for systems with non-constant rate.
16
+ # Checks that not providing conserved species throws and appropriate error.
16
17
let
17
18
# Create model
18
19
extended_brusselator = @reaction_network begin
29
30
p_start = [A => 1.0 , B => 4.0 , k1 => 0.1 ]
30
31
31
32
# Computes bifurcation diagram.
32
- ifurcationProblem (extended_brusselator, u0_guess, p_start, :B ; plot_var= :V , u0 = [:V => 1.0 ])
33
+ BifurcationProblem (extended_brusselator, u0_guess, p_start, :B ; plot_var= :V , u0 = [:V => 1.0 ])
33
34
p_span = (0.1 , 6.0 )
34
35
opt_newton = NewtonPar (tol = 1e-9 , max_iterations = 100 )
35
36
opts_br = ContinuationPar (dsmin = 0.0001 , dsmax = 0.001 , ds = 0.0001 ,
47
48
@test length (bif_dia. γ. specialpoint) == 3 # Includes start and end point.
48
49
hopf_bif_point = filter (sp -> sp. type == :hopf , bif_dia. γ. specialpoint)[1 ]
49
50
@test isapprox (hopf_bif_point. param, 1.5 , atol= 1e-5 )
51
+
52
+ # Tests that an error is thrown if information of conserved species is not fully provided.
53
+ @test_throws Exception BifurcationProblem (extended_brusselator, u0_guess, p_start, :B ; plot_var= :V , u0 = [:X => 1.0 ])
50
54
end
51
55
52
56
# Bistable switch.
81
85
@test bprob_BK. VF. F (u0, p) == bprob. VF. F (u0, p)
82
86
end
83
87
end
84
-
85
- # Three-state system, tests that bifurcation diagrams works for systems with conserved quantities.
0 commit comments