|
12 | 12 | (2) Every symbol used as a reaction reactant is inferred as a species.
|
13 | 13 | (3) Every symbol not declared in (1) or (2) that occurs in an expression provided after `@equations` is inferred as a variable.
|
14 | 14 | (4) Every symbol not declared in (1), (2), or (3) that occurs either as a reaction rate or stoichiometric coefficient is inferred to be a parameter.
|
15 |
| -E.g. in |
16 |
| -```julia |
17 |
| -@reaction_network begin |
18 |
| - @equations V1 + S ~ V2^2 |
19 |
| - (p + S + V1), S --> 0 |
20 |
| -end |
21 |
| -``` |
22 |
| -`S` is inferred as a species, `V1` and `V2` as variables, and `p` as a parameter. The previous special cases for the `@observables`, `@compounds`, and `@differentials` options still hold. Finally, the `@require_declaration` options (described in more detail below) can now be used to require everything to be explicitly declared. |
| 15 | + E.g. in |
| 16 | + ```julia |
| 17 | + @reaction_network begin |
| 18 | + @equations V1 + S ~ V2^2 |
| 19 | + (p + S + V1), S --> 0 |
| 20 | + end |
| 21 | + ``` |
| 22 | + `S` is inferred as a species, `V1` and `V2` as variables, and `p` as a parameter. The previous special cases for the `@observables`, `@compounds`, and `@differentials` options still hold. Finally, the `@require_declaration` options (described in more detail below) can now be used to require everything to be explicitly declared. |
23 | 23 | - New formula for determining whether the default differentials have been used within an `@equations` option. Now, if any expression `D(...)` is encountered (where `...` can be anything), this is inferred as usage of the default differential D. E.g. in the following equations `D` is inferred as a differential with respect to the default independent variable:
|
24 |
| -```julia |
25 |
| -@reaction_network begin |
26 |
| - @equations D(V) + V ~ 1 |
27 |
| -end |
28 |
| -@reaction_network begin |
29 |
| - @equations D(D(V)) ~ 1 |
30 |
| -end |
31 |
| -``` |
32 |
| -Please note that this cannot be used at the same time as `D` is used to represent a species, variable, or parameter (including is these are implicitly designated as such by e.g. appearing as a reaction reactant). |
| 24 | + ```julia |
| 25 | + @reaction_network begin |
| 26 | + @equations D(V) + V ~ 1 |
| 27 | + end |
| 28 | + @reaction_network begin |
| 29 | + @equations D(D(V)) ~ 1 |
| 30 | + end |
| 31 | + ``` |
| 32 | + Please note that this cannot be used at the same time as `D` is used to represent a species, variable, or parameter (including is these are implicitly designated as such by e.g. appearing as a reaction reactant). |
33 | 33 | - Array symbolics support is more consistent with ModelingToolkit v9. Parameter
|
34 | 34 | arrays are no longer scalarized by Catalyst, while species and variables
|
35 | 35 | arrays still are (as in ModelingToolkit). As such, parameter arrays should now
|
|
0 commit comments