Skip to content

Commit e9bb455

Browse files
Merge pull request #543 from TorkelE/convert_noise_scaling_docs
Add noise scaling option to convert(::SDESystem,rs:ReactionSystem...) docstring
2 parents 78df20d + 2c6d533 commit e9bb455

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/systems/reaction/reactionsystem.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,14 @@ Notes:
392392
law, i.e. for `2S -> 0` at rate `k` the ratelaw would be `k*S^2/2!`. If
393393
`combinatoric_ratelaws=false` then the ratelaw is `k*S^2`, i.e. the scaling factor is
394394
ignored.
395+
- `noise_scaling=nothing::Union{Vector{Operation},Operation,Nothing}` allows for linear
396+
scaling of the noise in the chemical Langevin equations. If `nothing` is given, the default
397+
value as in Gillespie 2000 is used. Alternatively, an `Operation` can be given, this is
398+
added as a parameter to the system (at the end of the parameter array). All noise terms
399+
are linearly scaled with this value. The parameter may be one already declared in the `ReactionSystem`.
400+
Finally, a `Vector{Operation}` can be provided (the length must be equal to the number of reactions).
401+
Here the noise for each reaction is scaled by the corresponding parameter in the input vector.
402+
This input may contain repeat parameters.
395403
"""
396404
function Base.convert(::Type{<:SDESystem},rs::ReactionSystem, combinatoric_ratelaws=true; noise_scaling=nothing::Union{Vector{Operation},Operation,Nothing})
397405
(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

Comments
 (0)