-
-
Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
This used to work, but doesn't anymore:
using ModelingToolkit, OrdinaryDiffEq, Test
using ModelingToolkit: t_nounits as t, D_nounits as D
# Defines the model.
@parameters k1 k2 V0
@variables X1(t) X2(t) Y1(t) Y2(t) V(t) = V0 W(t)
@parameters v = V w = W Γ[1:2] = missing [guess = [1.0, 1.0]]
eqs = [
0 ~ k1 * (Γ[1] - X1) - k2 * X1,
0 ~ k1 * (Γ[2] - Y1) - k2 * Y1,
0 ~ 1 - V,
0 ~ 1 - W,
]
observed = [X2 ~ Γ[1] - X1, Y2 ~ Γ[2] - Y1]
@mtkbuild osys = ODESystem(eqs, t, [X1, X2, Y1, Y2, V, W], [k1, k2, V0, v, w, Γ]; observed)
@mtkbuild nlsys = NonlinearSystem(eqs, [X1, X2, Y1, Y2, V, W], [k1, k2, V0, v, w, Γ]; observed)
# Create the`ODEProblem`s.
u0 = [X1 => 1.0, X2 => 2.0, Y1 => 3.0, Y2 => 4.0, V => 5.0, W => 6.0]
ps = [k1 => 0.1, k2 => 0.2, V0 => 3.0]
nlprob = NonlinearProblem(nlsys, u0, ps);
' This works
oprob = ODEProblem(osys, u0, 10.0, ps);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working