initialize: Initialize a 'rodeo' Object

Description Arguments Value Note Author(s) See Also Examples

Description

Initializes an object of the rodeo-class with data frames holding the specification of an ODE system.

Arguments

vars

Declaration of state variables appearing in the ODE system. Data frame with mandatory columns 'name', 'unit', 'description'.

pars

Declaration of parameters (i.e. constants) appearing in the ODE system. Data frame with the same mandatory columns as vars.

funs

Declaration of functions being referenced in the ODE system. Data frame with the same mandatory columns as vars or NULL if no function calls are present at the ODEs' right-hand sides.

pros

Declaration of process rates. Data frame with mandatory columns 'name', 'unit', 'description', 'expression'.

stoi

Declaration of stoichiometric factors. A data frame with mandatory columns 'variable', 'process', 'expression', if asMatrix is FALSE. The 'expression' colum holds the stoichiometric factors. If asMatrix is TRUE, this must be a matrix of type character with row names (processes) and colum names (variables). Empty or NA matrix elements are interpreted as zero stoichiometry factors.

asMatrix

Logical. Specifies whether stoichiometry information is given in matrix or data base format.

dim

An integer vector, specifying the number of boxes in each spatial dimension. Use c(1) to create a zero-dimensional (i.e. single-box) model. This is the default. Use, e.g. c(5) to create a 1-dimensional model with 5 boxes. To create, e.g., a 2-dimensional model with 4 x 5 boxes, use c(4,5).

Value

The method is called implicitly for its side effects when a rodeo object is instantiated with new. It has no accessible return value.

Note

The mandatory fields of the input data frames should be of type character. Additional fields may be present in these data frames and the contents becomes part of the rodeo object. The 'expression' fields of pros and stoi (or the contents of the stoichiometry matrix) should be valid mathematical expressions in R and Fortran. These can involve the names of declared state variables, parameters, and functions as well as numeric constants or basic math operators. Branching or loop constructs are not allowed (but these can appear inside referenced functions). There are currently few reserved words that cannot be used as variable, parameter, function, or process names. The reserved words are 'time', 'left', and 'right'.

Initialization does not assign numeric values to state variables or parameters. Use the decicated methods setVars and setPars for that purpose.

Author(s)

david.kneis@tu-dresden.de

See Also

See the package vignette for examples.

Examples

1
2
3
data(vars, pars, funs, pros, stoi)
model <- rodeo$new(vars, pars, funs, pros, stoi, dim=c(1))
print(model)

rodeo documentation built on March 28, 2021, 1:09 a.m.