You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/introduction_to_catalyst/catalyst_for_new_julia_users.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,8 +80,8 @@ The `@reaction_network` command is followed by the `begin` keyword, which is fol
80
80
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`.
81
81
```@example ex2
82
82
rn = @reaction_network begin
83
-
b, 0 --> X
84
-
d, X --> 0
83
+
b, 0 --> X
84
+
d, X --> 0
85
85
end
86
86
```
87
87
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
152
152
We declare the model using the `@reaction_network` macro, and store it in the `sir_model` variable.
153
153
```@example ex2
154
154
sir_model = @reaction_network begin
155
-
b, S + I --> 2I
156
-
k, I --> R
155
+
b, S + I --> 2I
156
+
k, I --> R
157
157
end
158
158
```
159
159
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.
Copy file name to clipboardExpand all lines: docs/src/inverse_problems/examples/ode_fitting_oscillation.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
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.
3
3
4
4
First, we fetch the required packages.
5
-
```@examplepe1
5
+
```@examplepe_osc_example
6
6
using Catalyst
7
7
using OrdinaryDiffEq
8
8
using Optimization
@@ -11,7 +11,7 @@ using SciMLSensitivity # Required for `Optimization.AutoZygote()` automatic diff
11
11
```
12
12
13
13
Next, we declare our model, the Brusselator oscillator.
14
-
```@examplepe1
14
+
```@examplepe_osc_example
15
15
brusselator = @reaction_network begin
16
16
A, ∅ --> X
17
17
1, 2X + Y --> 3X
@@ -24,7 +24,7 @@ nothing # hide
24
24
25
25
We simulate our model, and from the simulation generate sampled data points
26
26
(to which we add noise). We will use this data to fit the parameters of our model.
27
-
```@examplepe1
27
+
```@examplepe_osc_example
28
28
u0 = [:X => 1.0, :Y => 1.0]
29
29
tspan = (0.0, 30.0)
30
30
@@ -37,7 +37,7 @@ nothing # hide
37
37
```
38
38
39
39
We can plot the real solution, as well as the noisy samples.
0 commit comments