Add a Reaction to an ODE
reaction-set.RdThis function operates on an ODE vector field. It makes it possible
to construct the right hand side one reaction at a time:
reaction(vf,r,p) <- flux will add a flux term to the ODE's right
hand side (vector field), adding the given flux (reaction
kinetic) in the right places, informed by the reactants and
products.
Arguments
- vf
a named character vector of the right length (number of state variables)
- r
a named vector of stoichiometric coefficients for the reactants
- p
a named vector of stoichiometric coefficients for the products