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
@assertisa(outs[i], Tuple{Vararg{Symbol}}) """Outputs for scale $i should be a tuple of symbols, *e.g.* `"$i" => (:a, :b)`, found `"$i" => $(outs[i])` instead."""
116
+
outs_[i] = [outs[i]...]
117
+
end
118
+
114
119
statuses_ =copy(statuses)
115
120
# Checking that organs in outputs exist in the mtg (in the statuses):
116
121
if!all(i inkeys(statuses) for i inkeys(outs_))
@@ -168,18 +173,20 @@ function pre_allocate_outputs(statuses, statuses_template, reverse_multiscale_ma
168
173
delete!(outs_, organ)
169
174
else
170
175
# Some still exist, we only use the ones that do:
171
-
outs_[organ] =(existing_vars_requested...,)
176
+
outs_[organ] =[existing_vars_requested...]
172
177
end
173
178
end
174
179
end
175
180
176
181
if:node∉ outs_[organ]
177
-
outs_[organ] =(outs_[organ]..., :node)
182
+
push!(outs_[organ], :node)
178
183
end
179
184
end
180
185
186
+
outs_tuple =Dict(i =>Tuple(x for x in outs_[i]) for i inkeys(outs_))
187
+
181
188
# Making the pre-allocated outputs:
182
-
Dict(organ =>Dict(var => [typeof(statuses_[organ][1][var])[] for n in1:nsteps] for var in vars) for (organ, vars) inouts_)
189
+
Dict(organ =>Dict(var => [typeof(statuses_[organ][1][var])[] for n in1:nsteps] for var in vars) for (organ, vars) inouts_tuple)
183
190
# Note: we use the type of the variable from the first status for each organ to pre-allocate the outputs, because they are
0 commit comments