
This function creates an object of class plk
(subclass of ode
), which holds the basic information of the Power Law Kinetics system in question.
plk(A, s = solver(), r = NULL, rx0 = reg("none", lower = 0, upper = Inf,
fixed = TRUE))
The matrix of powers (pxd). Here 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 "plk" and "ode".
Power Law Kinetics is a class of ODE systems, having the following vector field:
ode, numsolve, field
# NOT RUN {
# Power law system
A <- matrix(
c(1, 0, 0, 0,
0, 1, 2, 0,
0, 0, 0, 1), ncol = 4, byrow = TRUE)
theta <- matrix(
c(0, 2, -0.5, 0,
1, 0, 0, 1,
-1, -1, -1, -1), ncol = 3, byrow = TRUE)
x0 <- c(X = 1, Y = 4, Z = 0.1, W = 0.1)
Time <- seq(0, 1, by = .1)
p <- plk(A)
# Solve system
numsolve(p, Time, x0, theta)
# Evaluate field
field(p, x0, theta)
# }
Run the code above in your browser using DataLab