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
In this tutorial we'll illustrate how to make use of constraint equations and
15
-
events. Let's consider a model of a cell with volume $V(t)$ that grows at a rate
16
-
$\lambda$. For now we'll assume the cell can grow indefinitely. We'll also keep
17
-
track of one protein $P(t)$, which is produced at a rate proportional $V$ and
18
-
can be degraded.
19
74
20
75
## [Coupling ODE constraints via extending a system](@id constraint_equations_coupling_constraints)
21
76
22
-
There are several ways we can create our Catalyst model with the two reactions
23
-
and ODE for $V(t)$. One approach is to use compositional modeling, create
24
-
separate `ReactionSystem`s and `ODESystem`s with their respective components,
25
-
and then extend the `ReactionSystem` with the `ODESystem`. Let's begin by
26
-
creating these two systems.
77
+
Finally, we could also construct our model by using compositional modeling. Here
78
+
we create separate `ReactionSystem`s and `ODESystem`s with their respective
79
+
components, and then extend the `ReactionSystem` with the `ODESystem`. Let's
80
+
begin by creating these two systems.
27
81
28
-
Here, to create differentials with respect to time (for our differential equations), we must import the time differential operator from Catalyst. We do this through `D = default_time_deriv()`. Here, `D(V)` denotes the differential of the variable `V` with respect to time.
82
+
Here, to create differentials with respect to time (for our differential
83
+
equations), we must import the time differential operator from Catalyst. We do
84
+
this through `D = default_time_deriv()`. Here, `D(V)` denotes the differential
85
+
of the variable `V` with respect to time.
29
86
30
87
```@example ceq1
31
88
using Catalyst, OrdinaryDiffEqTsit5, Plots
@@ -72,27 +129,6 @@ sol = solve(oprob, Tsit5())
72
129
plot(sol)
73
130
```
74
131
75
-
## Coupling ODE constraints via directly building a `ReactionSystem`
76
-
As an alternative to the previous approach, we could have constructed our
77
-
`ReactionSystem` all at once by directly using the symbolic interface:
0 commit comments