-
-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Labels
bugSomething isn't workingSomething isn't working
Description
using ModelingToolkit, OrdinaryDiffEq
using ModelingToolkit: t_nounits as t, D_nounits as D
@variables (X(t))[1:2]
@parameters p[1:2]
eqs = [
D(X[1]) ~ p[1] - X[1],
D(X[2]) ~ p[2] - X[2]
]
@named model = ODESystem(eqs, t)
model = complete(model)
# Problem inputs
u0_vec = [X => [1.0, 2.0]]
u0_dict = Dict([X => [1.0, 2.0]])
u0_tup = (X => [1.0, 2.0])
p_vec = [p => [4.0, 5.0]]
p_dict = Dict([p => [4.0, 5.0]])
p_tup = (p => [4.0, 5.0])
tspan = (0.0, 10.0)
# Problem creation:
ODEProblem(model, u0_vec, tspan, p_vec)
ODEProblem(model, u0_vec, tspan, p_dict)
ODEProblem(model, u0_vec, tspan, p_tup)
ODEProblem(model, u0_dict, tspan, p_vec)
ODEProblem(model, u0_dict, tspan, p_dict)
ODEProblem(model, u0_dict, tspan, p_tup)
ODEProblem(model, u0_tup, tspan, p_vec) # Error.
ODEProblem(model, u0_tup, tspan, p_dict) # Error.
ODEProblem(model, u0_tup, tspan, p_tup) # Error.Probably holds for other problem types as well
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working