25
25
u0 = [:X1 => 2.0 , :X2 => 2.0 , :X3 => 2.0 , :X2_2X3 => 2.0 ]
26
26
27
27
# Computes the single steady state, checks that when given to the ODE rhs, all are evaluated to 0.
28
- hc_ss = hc_steady_states (rs, ps; u0 = u0, show_progress = false , seed = 1234 )
28
+ hc_ss = hc_steady_states (rs, ps; u0 = u0, show_progress = false , seed = 0x000004d2 )
29
29
hc_ss = Pair .(unknowns (rs), hc_ss[1 ])
30
30
@test maximum (abs .(f_eval (rs, hc_ss, ps, 0.0 ))) ≈ 0.0 atol = 1e-12
31
31
45
45
end
46
46
ps = [:k3 => 1.0 , :k2 => 2.0 , :k4 => 1.5 , :k1 => 8.0 ]
47
47
48
- hc_ss_1 = hc_steady_states (wilhelm_2009_model, ps; seed = 1234 , show_progress = false )
48
+ hc_ss_1 = hc_steady_states (wilhelm_2009_model, ps; seed = 0x000004d2 , show_progress = false )
49
49
@test sort (hc_ss_1, by = sol-> sol[1 ]) ≈ [[0.0 , 0.0 ], [0.5 , 2.0 ], [4.5 , 6.0 ]]
50
50
51
- hc_ss_2 = hc_steady_states (wilhelm_2009_model, ps; seed = 1234 , show_progress = false )
52
- hc_ss_3 = hc_steady_states (wilhelm_2009_model, ps; seed = 1234 , show_progress = false )
51
+ hc_ss_2 = hc_steady_states (wilhelm_2009_model, ps; seed = 0x000004d2 , show_progress = false )
52
+ hc_ss_3 = hc_steady_states (wilhelm_2009_model, ps; seed = 0x000004d2 , show_progress = false )
53
53
@test hc_ss_1 != hc_ss_2
54
54
@test hc_ss_2 == hc_ss_3
55
55
end
69
69
ps = (:kY1 => 1.0 , :kY2 => 3 , :kZ1 => 1.0 , :kZ2 => 4.0 )
70
70
u0_1 = (:Y1 => 1.0 , :Y2 => 3 , :Z1 => 10 , :Z2 => 40.0 )
71
71
72
- ss_1 = sort (hc_steady_states (rs_1, ps; u0 = u0_1, show_progress = false , seed = 1234 ), by = sol-> sol[1 ])
72
+ ss_1 = sort (hc_steady_states (rs_1, ps; u0 = u0_1, show_progress = false , seed = 0x000004d2 ), by = sol-> sol[1 ])
73
73
@test ss_1 ≈ [[0.2 , 0.1 , 3.0 , 1.0 , 40.0 , 10.0 ]]
74
74
75
75
rs_2 = @reaction_network begin
81
81
end
82
82
u0_2 = [:B2 => 1.0 , :B1 => 3.0 , :A2 => 10.0 , :A1 => 40.0 ]
83
83
84
- ss_2 = sort (hc_steady_states (rs_2, ps; u0 = u0_2, show_progress = false , seed = 1234 ), by = sol-> sol[1 ])
84
+ ss_2 = sort (hc_steady_states (rs_2, ps; u0 = u0_2, show_progress = false , seed = 0x000004d2 ), by = sol-> sol[1 ])
85
85
@test ss_1 ≈ ss_2
86
86
end
87
87
96
96
d, X --> 0
97
97
end
98
98
ps = [:v => 5.0 , :K => 2.5 , :n => 3 , :d => 1.0 ]
99
- sss = hc_steady_states (rs, ps; filter_negative = false , show_progress = false , seed = 1234 )
99
+ sss = hc_steady_states (rs, ps; filter_negative = false , show_progress = false , seed = 0x000004d2 )
100
100
101
101
@test length (sss) == 4
102
102
for ss in sss
103
103
@test f_eval (rs,sss[1 ], last .(ps), 0.0 )[1 ] ≈ 0.0 atol = 1e-12
104
104
end
105
105
106
106
ps = [:v => 5.0 , :K => 2.5 , :n => 2.7 , :d => 1.0 ]
107
- @test_throws Exception hc_steady_states (rs, ps; show_progress = false , seed = 1234 )
107
+ @test_throws Exception hc_steady_states (rs, ps; show_progress = false , seed = 0x000004d2 )
108
108
end
109
109
110
110
125
125
126
126
# Checks that homotopy continuation correctly find the system's single steady state.
127
127
ps = [:p => 2.0 , :d => 1.0 , :k => 5.0 ]
128
- hc_ss = hc_steady_states (rs, ps; show_progress = false , seed = 1234 )
128
+ hc_ss = hc_steady_states (rs, ps; show_progress = false , seed = 0x000004d2 )
129
129
@test hc_ss ≈ [[2.0 , 0.2 , 10.0 ]]
130
130
end
131
131
138
138
p_start = [:p => 1.0 , :d => 0.2 ]
139
139
140
140
# Computes bifurcation diagram.
141
- @test_throws Exception hc_steady_states (incomplete_network, p_start; show_progress = false , seed = 1234 )
141
+ @test_throws Exception hc_steady_states (incomplete_network, p_start; show_progress = false , seed = 0x000004d2 )
142
142
end
143
143
144
144
# Tests that non-autonomous system throws an error
147
147
(k,t), 0 <--> X
148
148
end
149
149
ps = [:k => 1.0 ]
150
- @test_throws Exception hc_steady_states (rs, ps; show_progress = false , seed = 1234 )
150
+ @test_throws Exception hc_steady_states (rs, ps; show_progress = false , seed = 0x000004d2 )
151
151
end
0 commit comments