Skip to content

Commit cc3f4bd

Browse files
Merge pull request #4000 from ChrisRackauckas-Claude/fix-odeproblem-deprecated-calls
Fix deprecated ODEProblem API calls in documentation
2 parents caedda6 + 8f8dd7a commit cc3f4bd

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/src/basics/Composition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ p = [decay1.a => 0.1
5757
decay2.a => 0.2]
5858
5959
using OrdinaryDiffEq
60-
prob = ODEProblem(simplified_sys, x0, (0.0, 100.0), p)
60+
prob = ODEProblem(simplified_sys, [x0; p], (0.0, 100.0))
6161
sol = solve(prob, Tsit5())
6262
sol[decay2.f]
6363
```

docs/src/basics/Events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ ev = ModelingToolkit.SymbolicDiscreteCallback(
418418
@mtkcompile sys = System(
419419
D(x) ~ c * cos(x), t, [x], [c]; discrete_events = [ev])
420420
421-
prob = ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0])
421+
prob = ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi))
422422
sol = solve(prob, Tsit5())
423423
sol[c]
424424
```
@@ -439,7 +439,7 @@ will be saved. If we repeat the above example with `c` not a `discrete_parameter
439439
@mtkcompile sys = System(
440440
D(x) ~ c * cos(x), t, [x], [c]; discrete_events = [1.0 => [c ~ Pre(c) + 1]])
441441
442-
prob = ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0])
442+
prob = ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi))
443443
sol = solve(prob, Tsit5())
444444
sol.ps[c] # sol[c] will error, since `c` is not a timeseries value
445445
```

docs/src/tutorials/ode_modeling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ end
3636
3737
using OrdinaryDiffEq
3838
@mtkcompile fol = FOL()
39-
prob = ODEProblem(fol, [], (0.0, 10.0), [])
39+
prob = ODEProblem(fol, [], (0.0, 10.0))
4040
sol = solve(prob)
4141
4242
using Plots

docs/src/tutorials/programmatically_generating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ eqs = [D(x) ~ (h - x) / τ] # create an array of equations
4949
# Perform the standard transformations and mark the model complete
5050
# Note: Complete models cannot be subsystems of other models!
5151
fol = mtkcompile(model)
52-
prob = ODEProblem(fol, [], (0.0, 10.0), [])
52+
prob = ODEProblem(fol, [], (0.0, 10.0))
5353
using OrdinaryDiffEq
5454
sol = solve(prob)
5555

0 commit comments

Comments
 (0)