diff --git a/src/systems/nonlinear/initializesystem.jl b/src/systems/nonlinear/initializesystem.jl index e5e8f4a6a9..1a6521b068 100644 --- a/src/systems/nonlinear/initializesystem.jl +++ b/src/systems/nonlinear/initializesystem.jl @@ -110,6 +110,20 @@ function generate_initializesystem(sys::ODESystem; error("Invalid setup: parameter $(p) has no default value or initial guess") end push!(u0, varp => guesses[p]) + elseif Symbolics.isarraysymbolic(p) && Symbolics.shape(p) != Symbolics.Unknown() + for _p in collect(p) + if (_val1 = get(pmap, _p, nothing)) === missing || get(defs, _p, nothing) === missing + varp = tovar(_p) + paramsubs[_p] = varp + if _val1 !== nothing && _val1 !== missing + push!(eqs_ics, varp ~ _val1) + end + if !haskey(guesses, _p) + error("Invalid setup: parameter $(_p) has no default value or initial guess") + end + push!(u0, varp => guesses[_p]) + end + end end end pars = vcat(