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
Copy file name to clipboardExpand all lines: src/reactionsystem.jl
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1509,11 +1509,8 @@ function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
1509
1509
1510
1510
flatrs = Catalyst.flatten(rs)
1511
1511
error_if_constraints(SDESystem, flatrs)
1512
-
ifany(isnoisescalingparameter, get_ps(flatrs))
1513
-
any(is_noise_scaling_parameter.(parameters(rs))) &&error("You have declared some paraemters as noise scaling parameters, and also given a \"noise_scaling\" argument to SDEProblem. Please remove the \"noise_scaling\", as this way of scaling CLE noise is being depricated.")
1514
-
@warn"Passing noise scaling input into SDEProblem will be deprecated. New standard is to declare one (or several) paraemter as noise scaling parameters when the ReactionSystem is created. Please read https://docs.sciml.ai/Catalyst/stable/catalyst_applications/advanced_simulations/#Scaling-the-noise-magnitude-in-the-chemical-Langevin-equations."
1515
-
end
1516
1512
1513
+
isnothing(noise_scaling) && (noise_scaling =get_noise_scaling(rs)) # Required until passing nosie into SDEProblem can be depricated.
1517
1514
if noise_scaling isa AbstractArray
1518
1515
(length(noise_scaling) !=numreactions(flatrs)) &&
1519
1516
error("The number of elements in 'noise_scaling' must be equal "*
@@ -1650,6 +1647,12 @@ function DiffEqBase.SDEProblem(rs::ReactionSystem, u0, tspan,
1650
1647
include_zero_odes =true, checks =false,
1651
1648
check_length =false,
1652
1649
remove_conserved =false, kwargs...)
1650
+
1651
+
if!isnothing(noise_scaling)
1652
+
!isnothing(get_noise_scaling(rs)) &&error("You have declared some parameters as noise scaling parameters, and also given a \"noise_scaling\" argument to SDEProblem. Please remove the \"noise_scaling\", as this way of scaling CLE noise is being depricated.")
1653
+
@warn"Passing noise scaling input into SDEProblem will be deprecated. New standard is to declare one (or several) paraemter as noise scaling parameters when the ReactionSystem is created. Please read https://docs.sciml.ai/Catalyst/stable/catalyst_applications/advanced_simulations/#Scaling-the-noise-magnitude-in-the-chemical-Langevin-equations."
0 commit comments