Fix deprecated ODEProblem API calls in documentation #4000
Merged
+5
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the deprecated
ODEProblemAPI calls in the documentation to use the new API that was introduced in recent versions of ModelingToolkit.jl.Changes
Updated the following documentation files to replace the deprecated 4-argument
ODEProblem(sys, u0, tspan, p)signature with the new 3-argument signature where initial conditions and parameters are merged:docs/src/tutorials/ode_modeling.md (Line 39)
ODEProblem(fol, [], (0.0, 10.0), [])ODEProblem(fol, [], (0.0, 10.0))docs/src/tutorials/programmatically_generating.md (Line 52)
ODEProblem(fol, [], (0.0, 10.0), [])ODEProblem(fol, [], (0.0, 10.0))docs/src/basics/Events.md (Lines 421, 442)
ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0])ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi))docs/src/basics/Composition.md (Line 60)
ODEProblem(simplified_sys, x0, (0.0, 100.0), p)ODEProblem(simplified_sys, [x0; p], (0.0, 100.0))Impact
These changes eliminate deprecation warnings that users encounter when running the "Copy-Pastable Simplified Example" and other tutorial code from the documentation. The updated examples now use the current recommended API.
Test Plan
Fixes #3996
🤖 Generated with Claude Code