Open
Description
Bug 1: This should work (it works if you turn c
and d
into scalars), but fails:
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters a b c[1:1] d[1:1]
@variables f(t)
pdeps = [b ~ a, d[1] ~ c[1] + b]
@named M = ODESystem([f ~ 0], t; parameter_dependencies = pdeps)
Ms = structural_simplify(M)
prob = ODEProblem(Ms, [], (0.0, 1.0), [a => 1.0, c[1] => 1.0]; fully_determined = true)
ERROR: ExtraEquationsSystemException: The system is unbalanced. There are 2 highest order derivative variables and 3 equations.
More equations than variables, here are the potential extra equation(s):
0 ~ b + c[1] - d[1]
Note that the process of determining extra equations is a best-effort heuristic. The true extra equations are dependent on the model and may not be in this list.
The error should also say something different than "highest order derivative variables".