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
@@ -1510,7 +1510,13 @@ function Base.convert(::Type{<:SDESystem}, rs::ReactionSystem;
1510
1510
flatrs = Catalyst.flatten(rs)
1511
1511
error_if_constraints(SDESystem, flatrs)
1512
1512
1513
-
isnothing(noise_scaling) && (noise_scaling =get_noise_scaling(rs)) # Required until passing nosie into SDEProblem can be depricated.
1513
+
# Required until passing nosie into SDEProblem can be depricated. When properly deprecated, change the kwarg to noise_scaling = get_noise_scaling(rs).
1514
+
if!isnothing(noise_scaling)
1515
+
!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.")
1516
+
@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."
error("The number of elements in 'noise_scaling' must be equal "*
@@ -1551,7 +1557,7 @@ function get_noise_scaling(rs::ReactionSystem)
1551
1557
ifisempty(ns_params)
1552
1558
returnnothing
1553
1559
elseiflength(ns_params) ==1
1554
-
returnNum(ns_params[1])
1560
+
return ns_params[1]
1555
1561
elseiflength(ns_params) ==length(reactions(rs))
1556
1562
return ns_params
1557
1563
else
@@ -1648,11 +1654,6 @@ function DiffEqBase.SDEProblem(rs::ReactionSystem, u0, tspan,
1648
1654
check_length =false,
1649
1655
remove_conserved =false, kwargs...)
1650
1656
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