diff --git a/docs/src/basics/Composition.md b/docs/src/basics/Composition.md index 368c0287f7..3ae0b5a1d7 100644 --- a/docs/src/basics/Composition.md +++ b/docs/src/basics/Composition.md @@ -57,7 +57,7 @@ p = [decay1.a => 0.1 decay2.a => 0.2] using OrdinaryDiffEq -prob = ODEProblem(simplified_sys, x0, (0.0, 100.0), p) +prob = ODEProblem(simplified_sys, [x0; p], (0.0, 100.0)) sol = solve(prob, Tsit5()) sol[decay2.f] ``` diff --git a/docs/src/basics/Events.md b/docs/src/basics/Events.md index bfeac35526..ba0843de44 100644 --- a/docs/src/basics/Events.md +++ b/docs/src/basics/Events.md @@ -418,7 +418,7 @@ ev = ModelingToolkit.SymbolicDiscreteCallback( @mtkcompile sys = System( D(x) ~ c * cos(x), t, [x], [c]; discrete_events = [ev]) -prob = ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0]) +prob = ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi)) sol = solve(prob, Tsit5()) sol[c] ``` @@ -439,7 +439,7 @@ will be saved. If we repeat the above example with `c` not a `discrete_parameter @mtkcompile sys = System( D(x) ~ c * cos(x), t, [x], [c]; discrete_events = [1.0 => [c ~ Pre(c) + 1]]) -prob = ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0]) +prob = ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi)) sol = solve(prob, Tsit5()) sol.ps[c] # sol[c] will error, since `c` is not a timeseries value ``` diff --git a/docs/src/tutorials/ode_modeling.md b/docs/src/tutorials/ode_modeling.md index 6da2524140..0643c6918c 100644 --- a/docs/src/tutorials/ode_modeling.md +++ b/docs/src/tutorials/ode_modeling.md @@ -36,7 +36,7 @@ end using OrdinaryDiffEq @mtkcompile fol = FOL() -prob = ODEProblem(fol, [], (0.0, 10.0), []) +prob = ODEProblem(fol, [], (0.0, 10.0)) sol = solve(prob) using Plots diff --git a/docs/src/tutorials/programmatically_generating.md b/docs/src/tutorials/programmatically_generating.md index 93a9543818..f01ee8c3c4 100644 --- a/docs/src/tutorials/programmatically_generating.md +++ b/docs/src/tutorials/programmatically_generating.md @@ -49,7 +49,7 @@ eqs = [D(x) ~ (h - x) / τ] # create an array of equations # Perform the standard transformations and mark the model complete # Note: Complete models cannot be subsystems of other models! fol = mtkcompile(model) -prob = ODEProblem(fol, [], (0.0, 10.0), []) +prob = ODEProblem(fol, [], (0.0, 10.0)) using OrdinaryDiffEq sol = solve(prob)