@@ -487,24 +487,18 @@ end
487
487
488
488
# ODEProblem from AbstractReactionNetwork
489
489
function DiffEqBase. ODEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p= DiffEqBase. NullParameters (), args... ; kwargs... )
490
- u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
491
- p = typeof (p) <: Union{Array{<:Pair},DiffEqBase.NullParameters} ? p : Pair .(rs. ps,p)
492
490
return ODEProblem (convert (ODESystem,rs),u0,tspan,p, args... ; kwargs... )
493
491
end
494
492
495
493
# SDEProblem from AbstractReactionNetwork
496
494
function DiffEqBase. SDEProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan, p= DiffEqBase. NullParameters (), args... ; noise_scaling= nothing , kwargs... )
497
495
sde_sys = convert (SDESystem,rs,noise_scaling= noise_scaling)
498
- u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
499
- p = typeof (p) <: Union{Array{<:Pair},DiffEqBase.NullParameters} ? p : Pair .(sde_sys. ps,p)
500
496
p_matrix = zeros (length (rs. states), length (rs. eqs))
501
497
return SDEProblem (sde_sys,u0,tspan,p,args... ; noise_rate_prototype= p_matrix,kwargs... )
502
498
end
503
499
504
500
# DiscreteProblem from AbstractReactionNetwork
505
501
function DiffEqBase. DiscreteProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , tspan:: Tuple , p= DiffEqBase. NullParameters (), args... ; kwargs... )
506
- u0 = typeof (u0) <: Array{<:Pair} ? u0 : Pair .(rs. states,u0)
507
- p = typeof (p) <: Union{Array{<:Pair},DiffEqBase.NullParameters} ? p : Pair .(rs. ps,p)
508
502
return DiscreteProblem (convert (JumpSystem,rs), u0,tspan,p, args... ; kwargs... )
509
503
end
510
504
515
509
516
510
# SteadyStateProblem from AbstractReactionNetwork
517
511
function DiffEqBase. SteadyStateProblem (rs:: ReactionSystem , u0:: Union{AbstractArray, Number} , p= DiffEqBase. NullParameters (), args... ; kwargs... )
518
- # u0 = typeof(u0) <: Array{<:Pair} ? u0 : Pair.(rs.states,u0)
519
- # p = typeof(p) <: Union{Array{<:Pair},DiffEqBase.NullParameters} ? p : Pair.(rs.ps,p)
520
512
return SteadyStateProblem (ODEFunction (convert (ODESystem,rs)),u0,p, args... ; kwargs... )
521
513
end
522
514
0 commit comments