Skip to content

Commit db56a6a

Browse files
Merge pull request #4746 from ChrisRackauckas-Claude/agent/fix-docs-example-regressions
Fix documentation examples for current dependency APIs
2 parents c5b1d67 + 742e993 commit db56a6a

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

docs/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
1212
DynamicQuantities = "06fc5a27-2a28-4c7c-a15d-362465fb6821"
1313
FMI = "14a09403-18e3-468f-ad8a-74f8dda2d9ac"
1414
# FMIZoo = "724179cf-c260-40a9-bd27-cccc6fe2f195"
15+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1516
InfiniteOpt = "20393b10-9daf-11e9-18c9-8db751c92c57"
1617
Ipopt = "b6b21f68-93f8-5de0-b562-5493be1d77c9"
1718
JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5"
@@ -24,6 +25,8 @@ Optim = "429524aa-4258-5aef-a3af-852621145aeb"
2425
Optimization = "7f7a1694-90dd-40f0-9382-eb1efda571ba"
2526
OptimizationOptimJL = "36348300-93cb-4f02-beb5-3c3902f8871e"
2627
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
28+
OrdinaryDiffEqFunctionMap = "d3585ca7-f5d3-4ba6-8057-292ed1abd90f"
29+
OrdinaryDiffEqRosenbrock = "43230ef6-c299-4910-a778-202eb28ce4ce"
2730
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
2831
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
2932
SciCompDSL = "91a8cdf1-4ca6-467b-a780-87fda3fff15e"
@@ -48,6 +51,7 @@ Documenter = "1"
4851
DynamicQuantities = "1"
4952
FMI = "0.14"
5053
# FMIZoo = "1"
54+
Graphs = "1.5.2"
5155
InfiniteOpt = "0.6"
5256
Ipopt = "1"
5357
JumpProcesses = "9"
@@ -58,6 +62,8 @@ Optim = "1.9, 2"
5862
Optimization = "5"
5963
OptimizationOptimJL = "0.4"
6064
OrdinaryDiffEq = "6.31, 7"
65+
OrdinaryDiffEqFunctionMap = "1, 2"
66+
OrdinaryDiffEqRosenbrock = "1, 2"
6167
Plots = "1.36"
6268
PreallocationTools = "0.4, 1"
6369
SciCompDSL = "1"

docs/src/examples/tearing_parallelism.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ between the blocks. We can use the bipartite graph functionality to dig in and
149149
investigate what this means:
150150

151151
```@example tearing
152-
using ModelingToolkit.BipartiteGraphs
153-
ts = TearingState(expand_connections(big_rc))
154-
inc_org = BipartiteGraphs.incidence_matrix(ts.structure.graph)
152+
using Graphs.LinAlg: incidence_matrix
153+
using ModelingToolkitBase: asgraph, expand_connections
154+
inc_org = incidence_matrix(asgraph(expand_connections(big_rc)))
155155
# Note: sorted_incidence_matrix requires the system and matrix dimensions to match
156156
# blt_reduced = StructuralTransformations.sorted_incidence_matrix(sys)
157157
```

docs/src/tutorials/bifurcation_diagram_computation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ plot(bf;
125125

126126
Here, the value of `x` in the steady state does not change, however, at `μ=0` a Hopf bifurcation occur and the steady state turn unstable.
127127

128-
We compute the branch of periodic orbits which is nearby the Hopf Bifurcation. We thus provide the branch `bf.γ`, the index of the Hopf point we want to branch from: 2 in this case and a method `PeriodicOrbitOCollProblem(20, 5)` to compute periodic orbits.
128+
We compute the branch of periodic orbits which is nearby the Hopf Bifurcation. We thus provide the branch `bf.γ`, the index of the Hopf point we want to branch from: 2 in this case and a method `Collocation(20, 5)` to compute periodic orbits.
129129

130130
```@example Bif2
131131
br_po = continuation(bf.γ, 2, opts_br,
132-
PeriodicOrbitOCollProblem(20, 5);)
132+
Collocation(20, 5);)
133133
134134
plot(bf; putspecialptlegend = false,
135135
markersize = 2,

docs/src/tutorials/discrete_system.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ In this example, we will use the [`System`](@ref) API to create an SIR model.
55
```@example discrete
66
using ModelingToolkit
77
using ModelingToolkit: t_nounits as t
8-
using OrdinaryDiffEq: solve, FunctionMap
8+
using CommonSolve: solve
9+
using OrdinaryDiffEqFunctionMap: FunctionMap
910
1011
@inline function rate_to_proportion(r, t)
1112
1 - exp(-r * t)

docs/src/tutorials/ode_modeling.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ still is the problem using the `connected` system above):
291291

292292
```@example ode2
293293
using BenchmarkTools
294+
using OrdinaryDiffEqRosenbrock: Rodas4
294295
@btime solve(prob, Rodas4());
295296
nothing # hide
296297
```

0 commit comments

Comments
 (0)