-
-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Description
Description
The "More Features of the Initialization System: Steady-State and Observable Initialization" section in docs/src/tutorials/initialization.md has disabled examples due to compatibility issues.
Problem
The examples demonstrating steady-state initialization (setting derivatives to zero) and observable initialization are currently disabled due to a compatibility issue with the initialization system and the current ModelingToolkit stack.
Location
docs/src/tutorials/initialization.md - lines 496-542
Expected behavior
The following patterns should work:
- Steady-state initialization - Starting an ODE at steady state by setting derivatives to zero:
prob = ODEProblem(simpsys, [D(x) => 0.0, D(y) => 0.0], tspan, guesses = [x => 1, y => 1])- Observable initialization - Using an observable's initial condition directly:
prob = ODEProblem(simpsys, [D(x) => 0.0, z => 2.0], tspan, guesses = [x => 1, y => 1])Related code (Lotka-Volterra example)
@variables x(t) y(t) z(t)
@parameters α=1.5 β=1.0 γ=3.0 δ=1.0
eqs = [D(x) ~ α * x - β * x * y
D(y) ~ -γ * y + δ * x * y
z ~ x + y]
@named sys = System(eqs, t)
simpsys = mtkcompile(sys)Metadata
Metadata
Assignees
Labels
No labels