Learn R Programming

rodeo (version 0.8.2)

stoichiometry: Return the Stoichiometry Matrix

Description

Return and optionally evaluate the mathematical expression appearing in the stoichiometry matrix.

Value

A matrix of numeric or character type, depending on the value of

box.

Arguments

box

Either NULL or a vector of positive integers pointing to a spatial sub-unit of the model. If NULL, the mathematical expressions appearing in the stoichiometry matrix are not evaluated, hence, they are returned as character strings. If a spatial sub-unit is specified, a numeric matrix is returned. In the latter case, the values of state variables and parameters must have been set using the setVars and setPars methods.

time

Time. The value is ignored in the case of autonomous models.

See Also

See other methods of the rodeo-class or plotStoichiometry for a graphical representation of the stoichiometric factors only.

Examples

Run this code
data(vars, pars, funs, pros, stoi)
model <- rodeo$new(vars, pars, funs, pros, stoi, dim=c(1))
model$setPars(c(mu=0.8, half=0.1, yield= 0.1, vol=1000, flow=50, sub_in=1))
model$setVars(c(bac=0.1, sub=0.5))
monod <- function(c,h) {c/(c+h)}
print(model$stoichiometry(box=NULL))
print(model$stoichiometry(box=c(1)))

Run the code above in your browser using DataLab