Open
Description
In this MWE we provide the values of Y
and r
to the ODEProblem
. Since these are not part of the ODESystem
, the user have probably done something wrong, and an error should be thrown.
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
@parameters p d r
@variables X(t) Y(t)
eqs = [D(X) ~ p - d*X]
@mtkbuild osys = ODESystem(eqs, t)
u0 = [X => 1.0, Y => 1.0]
tspan = (0.0, 100.0)
ps = [p => 1.0, d => 1.0, r => 1.0]
prob = ODEProblem(osys, u0, tspan, ps) # works fine
The values are filtered away in the resulting problem, e.g.
prob[Y]
prob.ps[r]
both yields errors.
the same is the case for the other problem types as well.