File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ pages = Any[
40
40
" Steady state analysis" => Any[
41
41
" steady_state_functionality/homotopy_continuation.md" ,
42
42
" steady_state_functionality/nonlinear_solve.md" ,
43
- # "steady_state_functionality/steady_state_stability_computation.md",
43
+ # "steady_state_functionality/steady_state_stability_computation.md",
44
44
" steady_state_functionality/bifurcation_diagrams.md" ,
45
45
" steady_state_functionality/dynamical_systems.md"
46
46
],
Original file line number Diff line number Diff line change 27
27
@test_throws Exception Catalyst. iscomplexbalanced (rn, k)
28
28
end
29
29
30
+ # Test that incomplete rate maps error.
31
+ let
32
+ rn = @reaction_network begin
33
+ (k1, k2), C1 <--> C2
34
+ (k3, k4), C2 <--> C3
35
+ (k5, k6), C3 <--> C1
36
+ end
37
+
38
+ incorrect_params = Dict (:k1 => 0.5 )
39
+ @test_throws ErrorException Catalyst. iscomplexbalanced (rn, incorrect_params)
40
+ end
41
+
30
42
# Tests rate matrix computation for various input types.
31
43
let
32
44
# Declares network and its known rate matrix.
60
72
@test Catalyst. adjacencymat (rn, rates_tup) == rate_mat
61
73
@test Catalyst. adjacencymat (rn, rates_dict) == rate_mat
62
74
@test_throws Exception Catalyst. adjacencymat (rn, rate_vals)
75
+
76
+ incorrect_param_dict = Dict (:k1 => 1.0 )
77
+ @test_throws ErrorException Catalyst. ratematrix (rn, 123 )
78
+ @test_throws ErrorException Catalyst. ratematrix (rn, incorrect_param_dict)
79
+
63
80
@test_throws Exception Catalyst. iscomplexbalanced (rn, rates_invalid)
64
81
65
82
# Test sparse matrix
94
111
@test Catalyst. robustspecies (EnvZ_OmpR) == [6 ]
95
112
end
96
113
114
+ let
115
+ # Define a reaction network with bi-directional reactions
116
+ non_deficient_network = @reaction_network begin
117
+ (k1, k2), A <--> B
118
+ (k3, k4), B <--> C
119
+ end
120
+
121
+ # Test: Check that the error is raised for networks with deficiency != 1
122
+ @test_throws ErrorException Catalyst. robustspecies (non_deficient_network)
123
+ end
97
124
98
125
# ## Complex balance and reversibility tests ###
99
126
Original file line number Diff line number Diff line change 107
107
let
108
108
@named rs2 = ReactionSystem (rxs, t)
109
109
@test Catalyst. isequivalent (rs, rs2)
110
+
111
+ # Test with a type mismatch
112
+ @test Catalyst. isequivalent (rs, " Not a ReactionSystem" ) == false
110
113
end
111
114
112
115
# Defaults test.
You can’t perform that action at this time.
0 commit comments