-
-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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 MTK
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as D
t = default_t()
D = default_time_deriv()
@variables X(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.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working