initialize {rodeo}R Documentation

Initialize a rodeo Object

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

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

[Package rodeo version 0.8.2 Index]