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
Probably most likley to hapen when a symbolic variable is accidentally renamed. However, it seem weird that nonsensical stuff is just dismissed, instead of throwing an error:
# using MTKusing ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
t =default_t()
D =default_time_deriv()
@variablesX(t)
@parameters p d
eqs = [D(X) ~ p - d*X]
@mtkbuild osys =ODESystem(eqs, t)
p ="I accidentally renamed p"
u0 = [X =>1.0]
ps = [p =>1.0, d =>0.5]
oprob =ODEProblem(osys, u0, (0.0, 1.0), ps) # ERROR: Some parameters are missing from the variable map.@parameters p d
ps = [p =>1.0, d =>0.5, "Random stuff"=>3.0]
oprob =ODEProblem(osys, u0, (0.0, 1.0), ps) # Works.
The text was updated successfully, but these errors were encountered:
Probably most likley to hapen when a symbolic variable is accidentally renamed. However, it seem weird that nonsensical stuff is just dismissed, instead of throwing an error:
The text was updated successfully, but these errors were encountered: