Skip to content

Commit 635e824

Browse files
committed
up
1 parent 8fd8cf6 commit 635e824

File tree

11 files changed

+200
-201
lines changed

11 files changed

+200
-201
lines changed

docs/pages.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pages = Any[
1515
#"model_creation/parametric_stoichiometry.md",# Distributed parameters, rates, and initial conditions.
1616
# Loading and writing models to files.
1717
# Model visualisation.
18-
"model_creation/network_analysis.md",
18+
#"model_creation/network_analysis.md",
1919
"model_creation/chemistry_related_functionality.md",
2020
"Model creation examples" => Any[
21-
"model_creation/examples/basic_CRN_library.md",
21+
#"model_creation/examples/basic_CRN_library.md",
2222
"model_creation/examples/programmatic_generative_linear_pathway.md",
2323
#"model_creation/examples/hodgkin_huxley_equation.md",
2424
#"model_creation/examples/smoluchowski_coagulation_equation.md"
@@ -29,20 +29,20 @@ pages = Any[
2929
# Simulation introduction.
3030
"model_simulation/simulation_plotting.md",
3131
"model_simulation/simulation_structure_interfacing.md",
32-
"model_simulation/ensemble_simulations.md",
32+
#"model_simulation/ensemble_simulations.md",
3333
# Stochastic simulation statistical analysis.
34-
"model_simulation/ode_simulation_performance.md",
35-
# ODE Performance considerations/advice.
36-
# SDE Performance considerations/advice.
37-
# Jump Performance considerations/advice.
38-
# Finite state projection
34+
# "model_simulation/ode_simulation_performance.md",
35+
# # ODE Performance considerations/advice.
36+
# # SDE Performance considerations/advice.
37+
# # Jump Performance considerations/advice.
38+
# # Finite state projection
3939
],
4040
"Steady state analysis" => Any[
41-
"steady_state_functionality/homotopy_continuation.md",
41+
# "steady_state_functionality/homotopy_continuation.md",
4242
"steady_state_functionality/nonlinear_solve.md",
4343
"steady_state_functionality/steady_state_stability_computation.md",
44-
"steady_state_functionality/bifurcation_diagrams.md",
45-
"steady_state_functionality/dynamical_systems.md"
44+
# "steady_state_functionality/bifurcation_diagrams.md",
45+
# "steady_state_functionality/dynamical_systems.md"
4646
],
4747
"Inverse Problems" => Any[
4848
# Inverse problems introduction.

docs/src/introduction_to_catalyst/catalyst_for_new_julia_users.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ The `@reaction_network` command is followed by the `begin` keyword, which is fol
8080
Here, we create a simple [*birth-death* model](@ref basic_CRN_library_bd), where a single species ($X$) is created at rate $b$, and degraded at rate $d$. The model is stored in the variable `rn`.
8181
```@example ex2
8282
rn = @reaction_network begin
83-
b, 0 --> X
84-
d, X --> 0
83+
b, 0 --> X
84+
d, X --> 0
8585
end
8686
```
8787
For more information on how to use the Catalyst model creator (also known as *the Catalyst DSL*), please read [the corresponding documentation](https://docs.sciml.ai/Catalyst/stable/catalyst_functionality/dsl_description/).
@@ -152,8 +152,8 @@ Each reaction is also associated with a specific rate (corresponding to a parame
152152
We declare the model using the `@reaction_network` macro, and store it in the `sir_model` variable.
153153
```@example ex2
154154
sir_model = @reaction_network begin
155-
b, S + I --> 2I
156-
k, I --> R
155+
b, S + I --> 2I
156+
k, I --> R
157157
end
158158
```
159159
Note that the first reaction contains two different substrates (separated by a `+` sign). While there is only a single product (*I*), two copies of *I* are produced. The *2* in front of the product *I* denotes this.

docs/src/inverse_problems/examples/ode_fitting_oscillation.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
In this example we will use [Optimization.jl](https://github.com/SciML/Optimization.jl) to fit the parameters of an oscillatory system (the Brusselator) to data. Here, special consideration is taken to avoid reaching a local minimum. Instead of fitting the entire time series directly, we will start with fitting parameter values for the first period, and then use those as an initial guess for fitting the next (and then these to find the next one, and so on). Using this procedure is advantageous for oscillatory systems, and enables us to reach the global optimum.
33

44
First, we fetch the required packages.
5-
```@example pe1
5+
```@example pe_osc_example
66
using Catalyst
77
using OrdinaryDiffEq
88
using Optimization
@@ -11,7 +11,7 @@ using SciMLSensitivity # Required for `Optimization.AutoZygote()` automatic diff
1111
```
1212

1313
Next, we declare our model, the Brusselator oscillator.
14-
```@example pe1
14+
```@example pe_osc_example
1515
brusselator = @reaction_network begin
1616
A, ∅ --> X
1717
1, 2X + Y --> 3X
@@ -24,7 +24,7 @@ nothing # hide
2424

2525
We simulate our model, and from the simulation generate sampled data points
2626
(to which we add noise). We will use this data to fit the parameters of our model.
27-
```@example pe1
27+
```@example pe_osc_example
2828
u0 = [:X => 1.0, :Y => 1.0]
2929
tspan = (0.0, 30.0)
3030
@@ -37,7 +37,7 @@ nothing # hide
3737
```
3838

3939
We can plot the real solution, as well as the noisy samples.
40-
```@example pe1
40+
```@example pe_osc_example
4141
using Plots
4242
default(; lw = 3, framestyle = :box, size = (800, 400))
4343
@@ -49,7 +49,7 @@ Next, we create a function to fit the parameters using the `ADAM` optimizer. For
4949
a given initial estimate of the parameter values, `pinit`, this function will
5050
fit parameter values, `p`, to our data samples. We use `tend` to indicate the
5151
time interval over which we fit the model.
52-
```@example pe1
52+
```@example pe_osc_example
5353
function optimise_p(pinit, tend)
5454
function loss(p, _)
5555
newtimes = filter(<=(tend), sample_times)
@@ -71,12 +71,12 @@ nothing # hide
7171
```
7272

7373
Next, we will fit a parameter set to the data on the interval `(0, 10)`.
74-
```@example pe1
74+
```@example pe_osc_example
7575
p_estimate = optimise_p([5.0, 5.0], 10.0)
7676
```
7777

7878
We can compare this to the real solution, as well as the sample data
79-
```@example pe1
79+
```@example pe_osc_example
8080
newprob = remake(prob; tspan = (0., 10.), p = p_estimate)
8181
sol_estimate = solve(newprob, Rosenbrock23())
8282
plot(sol_real; color = [:blue :red], label = ["X real" "Y real"], linealpha = 0.2)
@@ -88,7 +88,7 @@ plot!(sol_estimate; color = [:darkblue :darkred], linestyle = :dash,
8888

8989
Next, we use this parameter estimate as the input to the next iteration of our
9090
fitting process, this time on the interval `(0, 20)`.
91-
```@example pe1
91+
```@example pe_osc_example
9292
p_estimate = optimise_p(p_estimate, 20.)
9393
newprob = remake(prob; tspan = (0., 20.), p = p_estimate)
9494
sol_estimate = solve(newprob, Rosenbrock23())
@@ -101,20 +101,20 @@ plot!(sol_estimate; color = [:darkblue :darkred], linestyle = :dash,
101101

102102
Finally, we use this estimate as the input to fit a parameter set on the full
103103
time interval of the sampled data.
104-
```@example pe1
104+
```@example pe_osc_example
105105
p_estimate = optimise_p(p_estimate, 30.0)
106106
107107
newprob = remake(prob; tspan = (0., 30.0), p = p_estimate)
108108
sol_estimate = solve(newprob, Rosenbrock23())
109109
plot(sol_real; color = [:blue :red], label = ["X real" "Y real"], linealpha = 0.2)
110110
scatter!(sample_times, sample_vals'; color = [:blue :red],
111-
label = ["Samples of X" "Samples of Y"], alpha = 0.4)
111+
label = ["Samples of X" "Samples of Y"], alpha = 0.4)
112112
plot!(sol_estimate; color = [:darkblue :darkred], linestyle = :dash,
113113
label = ["X estimated" "Y estimated"], xlimit = tspan)
114114
```
115115

116116
The final parameter estimate is then
117-
```@example pe1
117+
```@example pe_osc_example
118118
p_estimate
119119
```
120120
which is close to the actual parameter set of `[1.0, 2.0]`.
@@ -125,7 +125,7 @@ then extend the interval, is to avoid getting stuck in a local minimum. Here
125125
specifically, we chose our initial interval to be smaller than a full cycle of
126126
the oscillation. If we had chosen to fit a parameter set on the full interval
127127
immediately we would have obtained poor fit and an inaccurate estimate for the parameters.
128-
```@example pe1
128+
```@example pe_osc_example
129129
p_estimate = optimise_p([5.0,5.0], 30.0)
130130
131131
newprob = remake(prob; tspan = (0.0,30.0), p = p_estimate)

docs/src/inverse_problems/optimization_ode_param_fitting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using DiffEqParamEstim, Optimization
4040
ps_dummy = [:kB => 0.0, :kD => 0.0, :kP => 0.0]
4141
oprob = ODEProblem(rn, u0, (0.0, 10.0), ps_dummy)
4242
loss_function = build_loss_objective(oprob, Tsit5(), L2Loss(data_ts, data_vals), Optimization.AutoForwardDiff();
43-
maxiters = 10000, verbose = false, save_idxs = 4)
43+
maxiters = 10000, verbose = false, save_idxs = 4)
4444
nothing # hide
4545
```
4646
To `build_loss_objective` we provide the following arguments:

0 commit comments

Comments
 (0)