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
throw(ArgumentError("An ODESystem can only have one independent variable."))
327
-
diffvar in diffvars &&
328
-
throw(ArgumentError("The differential variable $diffvar is not unique in the system of equations."))
329
-
push!(diffvars, diffvar)
330
-
end
331
-
!(symtype(diffvar) === Real ||eltype(symtype(var)) === Real) &&throw(ArgumentError("Differential variable $var has type $(symtype(var)). Differential variables should not be concretely typed."))
332
-
333
-
push!(diffeq, eq)
334
-
else
335
-
push!(algeeq, eq)
336
-
end
337
-
end
338
-
for eq inget(kwargs, :parameter_dependencies, Equation[])
Copy file name to clipboardExpand all lines: src/utils.jl
+69Lines changed: 69 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1186,3 +1186,72 @@ function guesses_from_metadata!(guesses, vars)
1186
1186
end
1187
1187
end
1188
1188
1189
+
"""
1190
+
$(TYPEDSIGNATURES)
1191
+
1192
+
Find all the unknowns and parameters from the equations and parameter dependencies of an ODESystem or SDESystem. Return re-ordered equations, unknowns, and parameters.
throw(ArgumentError("An ODESystem can only have one independent variable."))
1226
+
diffvar in diffvars &&
1227
+
throw(ArgumentError("The differential variable $diffvar is not unique in the system of equations."))
1228
+
!(symtype(diffvar) === Real ||eltype(symtype(diffvar)) === Real) &&throw(ArgumentError("Differential variable $var has type $(symtype(diffvar)). Differential variables should not be concretely typed."))
1229
+
push!(diffvars, diffvar)
1230
+
end
1231
+
push!(diffeq, eq)
1232
+
else
1233
+
push!(algeeq, eq)
1234
+
end
1235
+
end
1236
+
for eq in param_deps
1237
+
collect_vars!(allunknowns, ps, eq, iv)
1238
+
end
1239
+
1240
+
new_ps =OrderedSet()
1241
+
for p in ps
1242
+
ifiscall(p) &&operation(p) === getindex
1243
+
par =arguments(p)[begin]
1244
+
if Symbolics.shape(Symbolics.unwrap(par)) !== Symbolics.Unknown() &&
0 commit comments