Skip to content

Commit

Permalink
Merge pull request #864 from SciML/param_stoich
Browse files Browse the repository at this point in the history
proposed param stoich doc changes
  • Loading branch information
TorkelE committed Jun 4, 2024
2 parents 705d684 + 297208f commit 940861e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/pages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pages = Any[
"model_creation/compositional_modeling.md",
#"model_creation/constraint_equations.md",
# Events.
#"model_creation/parametric_stoichiometry.md",# Distributed parameters, rates, and initial conditions.
"model_creation/parametric_stoichiometry.md",# Distributed parameters, rates, and initial conditions.
"model_creation/model_file_loading_and_export.md",# Distributed parameters, rates, and initial conditions.
# Loading and writing models to files.
"model_creation/model_visualisation.md",
Expand Down
6 changes: 5 additions & 1 deletion docs/src/model_creation/parametric_stoichiometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use symbolic stoichiometries, and discuss several caveats to be aware of.
Let's first consider a simple reversible reaction where the number of reactants
is a parameter, and the number of products is the product of two parameters.
```@example s1
using Catalyst, Latexify, DifferentialEquations, ModelingToolkit, Plots
using Catalyst, Latexify, OrdinaryDiffEq, ModelingToolkit, Plots
revsys = @reaction_network revsys begin
k₊, m*A --> (m*n)*B
k₋, B --> A
Expand Down Expand Up @@ -58,6 +58,7 @@ stoichiometries `(F,2*H,2)`.
Let's now convert `revsys` to ODEs and look at the resulting equations:
```@example s1
osys = convert(ODESystem, revsys)
osys = complete(osys)
equations(osys)
show(stdout, MIME"text/plain"(), equations(osys)) # hide
```
Expand Down Expand Up @@ -88,6 +89,7 @@ converting to an `ODESystem`). For the previous example this gives the following
(different) system of ODEs
```@example s1
osys = convert(ODESystem, revsys; combinatoric_ratelaws = false)
osys = complete(osys)
equations(osys)
show(stdout, MIME"text/plain"(), equations(osys)) # hide
```
Expand Down Expand Up @@ -139,7 +141,9 @@ The parameter `b` does not need to be explicitly declared in the

We next convert our network to a jump process representation
```@example s1
using JumpProcesses
jsys = convert(JumpSystem, burstyrn; combinatoric_ratelaws = false)
jsys = complete(jsys)
equations(jsys)
show(stdout, MIME"text/plain"(), equations(jsys)) # hide
```
Expand Down

0 comments on commit 940861e

Please sign in to comment.