You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -364,7 +365,7 @@ Convert a [`ReactionSystem`](@ref) to an [`ODESystem`](@ref).
364
365
Notes:
365
366
- `combinatoric_ratelaws=true` uses factorial scaling factors in calculating the rate
366
367
law, i.e. for `2S -> 0` at rate `k` the ratelaw would be `k*S^2/2!`. If
367
-
`combinatoric_ratelaws=false` then the ratelaw is `k*S^2`, i.e. the scaling factor is
368
+
`combinatoric_ratelaws=false` then the ratelaw is `k*S^2`, i.e. the scaling factor is
368
369
ignored.
369
370
"""
370
371
function Base.convert(::Type{<:ODESystem}, rs::ReactionSystem; combinatoric_ratelaws=true)
@@ -383,14 +384,15 @@ Convert a [`ReactionSystem`](@ref) to an [`SDESystem`](@ref).
383
384
Notes:
384
385
- `combinatoric_ratelaws=true` uses factorial scaling factors in calculating the rate
385
386
law, i.e. for `2S -> 0` at rate `k` the ratelaw would be `k*S^2/2!`. If
386
-
`combinatoric_ratelaws=false` then the ratelaw is `k*S^2`, i.e. the scaling factor is
387
+
`combinatoric_ratelaws=false` then the ratelaw is `k*S^2`, i.e. the scaling factor is
387
388
ignored.
388
389
"""
389
-
function Base.convert(::Type{<:SDESystem},rs::ReactionSystem, combinatoric_ratelaws=true)
390
+
function Base.convert(::Type{<:SDESystem},rs::ReactionSystem, combinatoric_ratelaws=true; noise_scaling=nothing::Union{Vector{Operation},Operation,Nothing})
391
+
(typeof(noise_scaling) <:Vector{Operation}) && (length(noise_scaling)!=length(rs.eqs)) &&error("The number of elements in 'noise_scaling' must be equal to the number of reactions in the reaction system.")
0 commit comments