@@ -457,25 +457,25 @@ end
457457
458458
459459# ODEProblem from AbstractReactionNetwork
460- function DiffEqBase. ODEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p, args... ; kwargs... )
460+ function DiffEqBase. ODEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p= DiffEqBase . NullParameters () , args... ; kwargs... )
461461 u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
462- p = typeof (p) <: Array{<:Pair} ? p : Pair .(rs. ps,p)
462+ p = typeof (p) <: Union{ Array{<:Pair},DiffEqBase.NullParameters } ? p : Pair .(rs. ps,p)
463463 return ODEProblem (convert (ODESystem,rs),u0,tspan,p, args... ; kwargs... )
464464end
465465
466466# SDEProblem from AbstractReactionNetwork
467- function DiffEqBase. SDEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p, args... ; noise_scaling= nothing :: Union{Operation,Nothing} , kwargs... )
467+ function DiffEqBase. SDEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p= DiffEqBase . NullParameters () , args... ; noise_scaling= nothing :: Union{Operation,Nothing} , kwargs... )
468468 sde_sys = convert (SDESystem,rs,noise_scaling= noise_scaling)
469469 u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
470- p = typeof (p) <: Array{<:Pair} ? p : Pair .(sde_sys. ps,p)
470+ p = typeof (p) <: Union{ Array{<:Pair},DiffEqBase.NullParameters } ? p : Pair .(sde_sys. ps,p)
471471 p_matrix = zeros (length (rs. states), length (rs. eqs))
472472 return SDEProblem (sde_sys,u0,tspan,p,args... ; noise_rate_prototype= p_matrix,kwargs... )
473473end
474474
475475# DiscreteProblem from AbstractReactionNetwork
476- function DiffEqBase. DiscreteProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan:: Tuple , p= nothing , args... ; kwargs... )
476+ function DiffEqBase. DiscreteProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan:: Tuple , p= DiffEqBase . NullParameters () , args... ; kwargs... )
477477 u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
478- p = typeof (p) <: Array{<:Pair} ? p : Pair .(rs. ps,p)
478+ p = typeof (p) <: Union{ Array{<:Pair},DiffEqBase.NullParameters } ? p : Pair .(rs. ps,p)
479479 return DiscreteProblem (convert (JumpSystem,rs), u0,tspan,p, args... ; kwargs... )
480480end
481481
@@ -485,9 +485,9 @@ function DiffEqJump.JumpProblem(rs::ReactionSystem, prob, aggregator, args...; k
485485end
486486
487487# SteadyStateProblem from AbstractReactionNetwork
488- function DiffEqBase. SteadyStateProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , p, args... ; kwargs... )
488+ function DiffEqBase. SteadyStateProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , p= DiffEqBase . NullParameters () , args... ; kwargs... )
489489 # u0 = typeof(u0) <: Array{<:Pair} ? u0 : Pair.(rs.states,u0)
490- # p = typeof(p) <: Array{<:Pair} ? p : Pair.(rs.ps,p)
490+ # p = typeof(p) <: Union{ Array{<:Pair},DiffEqBase.NullParameters } ? p : Pair.(rs.ps,p)
491491 return SteadyStateProblem (ODEFunction (convert (ODESystem,rs)),u0,p, args... ; kwargs... )
492492end
493493
0 commit comments