|
1 |
| - |
2 | 1 | classdef HIRESProblem < otp.Problem
|
| 2 | + % An eight-variable high irradiance response model from plant physiology. |
| 3 | + % |
| 4 | + % In :cite:p:`Sch75`, the following chemical reactions were proposed to explain the high irradiance responses of |
| 5 | + % photomorphogenesis on the basis of phytochrome: |
| 6 | + % |
| 7 | + % $$ |
| 8 | + % \begin{array}{cccc} |
| 9 | + % \xrightarrow{o_{k_s}} & \ce{P_{{r}}} & \xrightleftharpoons[k_2]{k_1} & \ce{P_{fr}} \\ |
| 10 | + % & {\scriptsize k_6} ↑ & & ↓ {\scriptsize k_3} \\ |
| 11 | + % & \ce{P_{{r}}X} & \xrightleftharpoons[k_2]{k_1} & \ce{P_{fr}X} \\ |
| 12 | + % & {\scriptsize k_5} ↑ & & ↓ {\scriptsize k_4} \\ |
| 13 | + % & \ce{P_{{r}}X'} & \xrightleftharpoons[k_2]{k_1} & \ce{P_{fr}X'} \\ |
| 14 | + % \end{array} |
| 15 | + % $$ |
| 16 | + % |
| 17 | + % $$ |
| 18 | + % \begin{array}{ccccc} |
| 19 | + % \ce{E + P_{{r}}X'} & \xleftarrow{k_2} & \ce{P_{fr}X'E} & \xrightleftharpoons[k_{-}]{k_{+}} & \ce{P_{fr}X' + E} \\ |
| 20 | + % & & ↓ {\scriptsize k^*} \\ |
| 21 | + % & & \ce{P_{fr}' + X' + E} |
| 22 | + % \end{array} |
| 23 | + % $$ |
| 24 | + % |
| 25 | + % Reactants $\ce{P_{{r}}}$ and $\ce{P_{fr}}$ are the red and far-red absorbing form of phytochrome, respectively. |
| 26 | + % These can be bound by receptors $\ce{X}$ and $\ce{X'}$, partially influenced by enzyme $\ce{E}$. The system is |
| 27 | + % modeled by the differential equations :cite:p:`Got77` :cite:p:`dSL98` |
| 28 | + % |
| 29 | + % $$ |
| 30 | + % \frac{d}{dt} \ce{[P_{{r}}]} &= -k_1 \ce{[P_{{r}}]} + k_2 \ce{[P_{fr}]} + k_6 \ce{[P_{{r}}X]} + o_{k_s}, \\ |
| 31 | + % \frac{d}{dt} \ce{[P_{fr}]} &= k_1 \ce{[P_{{r}}]} - (k_2 + k_3) \ce{[P_{fr}]}, \\ |
| 32 | + % \frac{d}{dt} \ce{[P_{{r}}X]} &= -(k_1 + k_6) \ce{[P_{{r}}X]} + k_2 \ce{[P_{fr}X]} + k_5 \ce{[P_{fr}X']}, \\ |
| 33 | + % \frac{d}{dt} \ce{[P_{fr}X]} &= k_3 \ce{[P_{fr}]} + k_1 \ce{[P_{{r}}X]} - (k_2 + k_4) \ce{[P_{fr}X]}, \\ |
| 34 | + % \frac{d}{dt} \ce{[P_{{r}}X']} &= -(k_1 + k_5) \ce{[P_{{r}}X']} + k_2 \ce{[P_{fr}X']} + k_2 \ce{[P_{fr}X'E]}, \\ |
| 35 | + % \frac{d}{dt} \ce{[P_{fr}X']} &= k_4 \ce{[P_{fr}X]} + k_1 \ce{[P_{{r}}X']} - k_2 \ce{[P_{fr}X']} |
| 36 | + % + k_{-} \ce{[P_{fr}X'E]} - k_{+} \ce{[P_{fr}X']} \ce{[E]}, \\ |
| 37 | + % \frac{d}{dt} \ce{[P_{fr}X'E]} &= -(k_2 + k_{-} + k^*) \ce{[P_{fr}X'E]} + k_{+} \ce{[P_{fr}X']} \ce{[E]}, \\ |
| 38 | + % \frac{d}{dt} \ce{[E]} &= (k_2 + k_{-} + k^*) \ce{[P_{fr}X'E]} - k_{+} \ce{[P_{fr}X']} \ce{[E]}. |
| 39 | + % $$ |
| 40 | + % |
| 41 | + % Notes |
| 42 | + % ----- |
| 43 | + % +---------------------+--------------------------------------------------------------------+ |
| 44 | + % | Type | ODE | |
| 45 | + % +---------------------+--------------------------------------------------------------------+ |
| 46 | + % | Number of Variables | 8 | |
| 47 | + % +---------------------+--------------------------------------------------------------------+ |
| 48 | + % | Stiff | typically, depending on $k_1, …, k_6$, $k_{+}$, $k_{-}$, and $k^*$ | |
| 49 | + % +---------------------+--------------------------------------------------------------------+ |
| 50 | + % |
| 51 | + % Example |
| 52 | + % ------- |
| 53 | + % >>> problem = otp.hires.presets.Canonical; |
| 54 | + % >>> sol = problem.solve('AbsTol', 1e-12); |
| 55 | + % >>> problem.plot(sol); |
3 | 56 |
|
4 | 57 | methods
|
5 | 58 | function obj = HIRESProblem(timeSpan, y0, parameters)
|
| 59 | + % Create a HIRES problem object. |
| 60 | + % |
| 61 | + % Parameters |
| 62 | + % ---------- |
| 63 | + % timeSpan : numeric(1, 2) |
| 64 | + % The start and final time. |
| 65 | + % y0 : numeric(2, 1) |
| 66 | + % The initial conditions. |
| 67 | + % parameters : otp.hires.HIRESParameters |
| 68 | + % The parameters. |
6 | 69 | obj@otp.Problem('HIRES', 8, timeSpan, y0, parameters);
|
7 | 70 | end
|
8 | 71 | end
|
9 | 72 |
|
10 | 73 | methods (Access = protected)
|
11 | 74 | function onSettingsChanged(obj)
|
12 |
| - obj.RHS = otp.RHS(@otp.hires.f, ... |
13 |
| - 'Jacobian', @otp.hires.jacobian, ... |
14 |
| - 'JacobianVectorProduct', @otp.hires.jacobianVectorProduct, ... |
15 |
| - 'JacobianAdjointVectorProduct', @otp.hires.jacobianAdjointVectorProduct); |
| 75 | + k1 = obj.Parameters.K1; |
| 76 | + k2 = obj.Parameters.K2; |
| 77 | + k3 = obj.Parameters.K3; |
| 78 | + k4 = obj.Parameters.K4; |
| 79 | + k5 = obj.Parameters.K5; |
| 80 | + k6 = obj.Parameters.K6; |
| 81 | + kPlus = obj.Parameters.KPlus; |
| 82 | + kMinus = obj.Parameters.KMinus; |
| 83 | + kStar = obj.Parameters.KStar; |
| 84 | + oks = obj.Parameters.OKS; |
| 85 | + |
| 86 | + obj.RHS = otp.RHS(@(t, y) otp.hires.f(t, y, k1, k2, k3, k4, k5, k6, kPlus, kMinus, kStar, oks), ... |
| 87 | + 'Jacobian', @(t, y) otp.hires.jacobian(t, y, k1, k2, k3, k4, k5, k6, kPlus, kMinus, kStar, oks), ... |
| 88 | + 'JacobianVectorProduct', @(t, y, v) ... |
| 89 | + otp.hires.jacobianVectorProduct(t, y, v, k1, k2, k3, k4, k5, k6, kPlus, kMinus, kStar, oks), ... |
| 90 | + 'JacobianAdjointVectorProduct', @(t, y, v) ... |
| 91 | + otp.hires.jacobianAdjointVectorProduct(t, y, v, k1, k2, k3, k4, k5, k6, kPlus, kMinus, kStar, oks), ... |
| 92 | + 'Vectorized', 'on', ... |
| 93 | + 'NonNegative', 1:obj.NumVars); |
| 94 | + end |
| 95 | + |
| 96 | + function label = internalIndex2label(obj, index) |
| 97 | + switch index |
| 98 | + case 1 |
| 99 | + label = 'P_r'; |
| 100 | + case 2 |
| 101 | + label = 'P_{fr}'; |
| 102 | + case 3 |
| 103 | + label = 'P_r X'; |
| 104 | + case 4 |
| 105 | + label = 'P_{fr} X'; |
| 106 | + case 5 |
| 107 | + label = 'P_r X'''; |
| 108 | + case 6 |
| 109 | + label = 'P_{fr} X'''; |
| 110 | + case 7 |
| 111 | + label = 'P_{fr} X'' E'; |
| 112 | + case 8 |
| 113 | + label = 'E'; |
| 114 | + end |
16 | 115 | end
|
17 | 116 |
|
18 | 117 | function fig = internalPlot(obj, t, y, varargin)
|
|
0 commit comments