We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec4c32e commit 924169bCopy full SHA for 924169b
src/systems/nonlinear/initializesystem.jl
@@ -193,6 +193,15 @@ function generate_initializesystem(sys::AbstractSystem;
193
append!(eqs_ics, trueobs)
194
end
195
196
+ # even if `p => tovar(p)` is in `paramsubs`, `isparameter(p[1]) === true` after substitution
197
+ # so add scalarized versions as well
198
+ for k in collect(keys(paramsubs))
199
+ symbolic_type(k) == ArraySymbolic() || continue
200
+ for i in eachindex(k)
201
+ paramsubs[k[i]] = paramsubs[k][i]
202
+ end
203
204
+
205
eqs_ics = Symbolics.substitute.(eqs_ics, (paramsubs,))
206
if is_time_dependent(sys)
207
vars = [vars; collect(values(paramsubs))]
0 commit comments