
This function creates an object of class mak
(subclass of ode
), which holds the basic information of the Mass Action Kinetics system in question.
mak(A, B, s = solver(), r = NULL, rx0 = reg("none", lower = 0, upper =
Inf, fixed = TRUE))
The reactant stoichiometric matrix (pxd) containing non-negative values. Here p is the number of parameters and d the number of species.
The product stoichiometric matrix (pxd) containing non-negative values. Here p is the number of parameters and d the number of species.
solver
object.
An object of class reg
giving info about how to regularise and bound the rate parameters. If not provided, the default one is used.
An object of class reg
giving info about how to regularise and bound the initial state parameter. If not provided, the default one is used. This default reg
sets fixed = TRUE
, which is generally recommended.
An object with S3 class "mak" and "ode".
Mass Action Kinetics is a class of ODE systems, having the following vector field:
ode, numsolve, field
# NOT RUN {
# Michaelis-Menten system
A <- matrix(
c(1, 1, 0, 0,
0, 0, 1, 0,
0, 0, 1, 0), ncol = 4, byrow = TRUE)
B <- matrix(
c(0, 0, 1, 0,
1, 1, 0, 0,
1, 0, 0, 1), ncol = 4, byrow = TRUE)
k <- c(1, 2, 0.5)
x0 <- c(E = 1, S = 4, ES = 0, P = 0)
Time <- seq(0, 1, by = .1)
m <- mak(A, B)
# Solve system
numsolve(m, Time, x0, k)
# Evaluate field
field(m, x0, k)
# }
Run the code above in your browser using DataLab