Skip to content

Commit 4e272f8

Browse files
committed
fail fixes
1 parent 0489cfe commit 4e272f8

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

docs/src/inverse_problems/optimization_ode_param_fitting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Catalyst.PNG(plot(plt; fmt = :png, dpi = 200)) # hide
3939

4040
Next, we will use DiffEqParamEstim to build a loss function to measure how well our model's solutions fit the data.
4141
```@example diffeq_param_estim_1
42-
using DiffEqParamEstim, Optimization
42+
using DiffEqParamEstim, Optimization, OrdinaryDiffEqTsit5
4343
ps_dummy = [:kB => 0.0, :kD => 0.0, :kP => 0.0]
4444
oprob = ODEProblem(rn, u0, (0.0, 10.0), ps_dummy)
4545
loss_function = build_loss_objective(oprob, Tsit5(), L2Loss(data_ts, data_vals), Optimization.AutoForwardDiff();

docs/src/model_creation/examples/hodgkin_huxley_equation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ complete model.
1818

1919
We begin by importing some necessary packages:
2020
```@example hh1
21-
using ModelingToolkit, Catalyst, NonlinearSolve, Plots, OrdinaryDiffEqDefault
21+
using ModelingToolkit, Catalyst, NonlinearSolve, Plots, OrdinaryDiffEqRosenbrock
2222
```
2323

2424
## Building the model via the Catalyst DSL

docs/src/model_simulation/ode_simulation_performance.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ sol1.retcode
4040
```
4141
Next, we instead try the `Rodas5P` solver (which is designed for stiff problems):
4242
```@example ode_simulation_performance_1
43+
using OrdinaryDiffEqRosenbrock
4344
sol2 = solve(oprob, Rodas5P())
4445
plot(sol2)
4546
```
@@ -69,15 +70,14 @@ oprob = ODEProblem(bd_model, u0, tspan, ps)
6970
solve(oprob, Tsit5())
7071
nothing # hide
7172
```
73+
7274
If no solver argument is provided to `solve`, and the `OrdinaryDiffEqDefault` sub-library or top-level `OrdinaryDiffEq` library is installed, then one is automatically selected:
73-
```@example
75+
```@example ode_simulation_performance_2
7476
using OrdinaryDiffEqDefault
75-
ode_simulation_performance_2solve(oprob)
77+
solve(oprob)
7678
nothing # hide
7779
```
7880

79-
80-
8181
While the default choice is typically enough for most single simulations, if performance is important, it can be worthwhile exploring the available solvers to find one that is especially suited for the given problem. A complete list of possible ODE solvers, with advice on optimal selection, can be found [here](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/). This section will give some general advice.
8282

8383
The most important part of solver selection is to select one appropriate for [the problem's stiffness](@ref ode_simulation_performance_stiffness). Generally, the `Tsit5` solver is good for non-stiff problems, and `Rodas5P` for stiff problems. For large stiff problems (with many species), `FBDF` can be a good choice. We can illustrate the impact of these choices by simulating our birth-death process using the `Tsit5`, `Vern7` (an explicit solver yielding [low error in the solution](@ref ode_simulation_performance_error)), `Rodas5P`, and `FBDF` solvers (benchmarking their respective performance using [BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl)):
@@ -111,7 +111,7 @@ By default, OrdinaryDiffEq computes the Jacobian using [*automatic differentiati
111111

112112
To use this option, simply set `jac = true` when constructing an `ODEProblem`:
113113
```@example ode_simulation_performance_3
114-
using Catalyst, OrdinaryDiffEq
114+
using Catalyst, OrdinaryDiffEqDefault
115115
116116
brusselator = @reaction_network begin
117117
A, ∅ --> X
@@ -179,7 +179,7 @@ Generally, the use of preconditioners is only recommended for advanced users who
179179
## [Elimination of system conservation laws](@id ode_simulation_performance_conservation_laws)
180180
Previously, we have described how Catalyst, when it generates ODEs, is able to [detect and eliminate conserved quantities](@ref conservation_laws). In certain cases, doing this can improve performance. E.g. in the following example we will eliminate the single conserved quantity in a [two-state model](@ref basic_CRN_library_two_states). This results in a differential algebraic equation with a single differential equation and a single algebraic equation (as opposed to two differential equations). However, as the algebraic equation is fully determined by the ODE solution, Catalyst moves it to be an observable and our new system therefore only contains one ODE that must be solved numerically. Conservation laws can be eliminated by providing the `remove_conserved = true` option to `ODEProblem`:
181181
```@example ode_simulation_performance_conservation_laws
182-
using Catalyst, OrdinaryDiffEq
182+
using Catalyst, OrdinaryDiffEqTsit5
183183
184184
# Declare model.
185185
rs = @reaction_network begin
@@ -214,7 +214,7 @@ end
214214
```
215215
The model can be simulated, showing how $P$ is produced from $S$:
216216
```@example ode_simulation_performance_4
217-
using OrdinaryDiffEq, Plots
217+
using OrdinaryDiffEqTsit5, Plots
218218
u0 = [:S => 1.0, :E => 1.0, :SE => 0.0, :P => 0.0]
219219
tspan = (0.0, 50.0)
220220
ps = [:kB => 1.0, :kD => 0.1, :kP => 0.5, :d => 0.1]
@@ -301,7 +301,7 @@ Which backend package you should use depends on your available hardware, with th
301301

302302
Next, we declare our model and `ODEProblem`. However, we make all values `Float64` (by appending `f0` to them) and all vectors static (by adding `@SVector` before their declaration, something which requires the [StaticArrays](https://github.com/JuliaArrays/StaticArrays.jl) package).
303303
```@example ode_simulation_performance_5
304-
using Catalyst, OrdinaryDiffEq, StaticArrays
304+
using Catalyst, OrdinaryDiffEqDefault, StaticArrays
305305
306306
mm_model = @reaction_network begin
307307
kB, S + E --> SE
@@ -311,7 +311,7 @@ mm_model = @reaction_network begin
311311
end
312312
@unpack S, E, SE, P, kB, kD, kP, d = mm_model
313313
314-
using OrdinaryDiffEq, Plots
314+
using OrdinaryDiffEqDefault, Plots
315315
u0 = @SVector [S => 1.0f0, E => 1.0f0, SE => 0.0f0, P => 0.0f0]
316316
tspan = (0.0f0, 50.0f0)
317317
p = @SVector [kB => 1.0f0, kD => 0.1f0, kP => 0.5f0, d => 0.1f0]

docs/src/spatial_modelling/lattice_simulation_structure_ interaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ lat_getu(sol, :X1, lrs; t = [0.5, 0.75])
5757
## [Retrieving and updating species values in problems and integrators](@id lattice_simulation_structure_interaction_prob_int_species)
5858
Let us consider a spatial `ODEProblem`
5959
```@example lattice_struct_interaction_prob_ints
60-
using Catalyst, OrdinaryDiffEq
60+
using Catalyst, OrdinaryDiffEqDefault
6161
two_state_model = @reaction_network begin
6262
(k1,k2), X1 <--> X2
6363
end

docs/src/steady_state_functionality/dynamical_systems.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ Here, the largest exponent is positive, suggesting that the model is chaotic (or
9393

9494
Next, we consider the [Brusselator] model. First we simulate the model for two similar initial conditions, confirming that they converge to the same limit cycle:
9595
```@example dynamical_systems_lyapunov
96+
using OrdinaryDiffEqTsit5
9697
brusselator = @reaction_network begin
9798
A, ∅ --> X
9899
1, 2X + Y --> 3X

0 commit comments

Comments
 (0)