@@ -158,15 +158,21 @@ let
158
158
end
159
159
160
160
# Tests using default values for noise scaling.
161
- let
162
- noise_scaling_network = @reaction_network begin
161
+ # Tests when reaction system is created programmatically.
162
+ # Tests @noise_scaling_parameters macro.
163
+ let
164
+ @variables t
165
+ @species X1 (t) X2 (t)
163
166
@noise_scaling_parameters η= 0.0
164
- (k1, k2), X1 ↔ X2
167
+ @parameters k1 k2
168
+ r1 = Reaction (k1,[X1],[X2],[1 ],[1 ])
169
+ r2 = Reaction (k2,[X2],[X1],[1 ],[1 ])
170
+ @named noise_scaling_network = ReactionSystem ([r1, r2], t, [X1, X2], [k1, k2, η])
171
+
172
+ u0 = [:X1 => 1100.0 , :X2 => 3900.0 ]
173
+ p = [:k1 => 2.0 , :k2 => 0.5 , :η => 0.0 ]
174
+ @test SDEProblem (noise_scaling_network, u0, (0.0 , 1000.0 ), p)[:η ] == 0.0
165
175
end
166
- u0 = [:X1 => 1100.0 , :X2 => 3900.0 ]
167
- p = [:k1 => 2.0 , :k2 => 0.5 , :η => 0.0 ]
168
- @test SDEProblem (noise_scaling_network, u0, (0.0 , 1000.0 ), p)[:η ] == 0.0
169
- end
170
176
171
177
# Complicated test with many combinations of options.
172
178
let
0 commit comments