Model | R Documentation |
Model
is an R6 class that defines an object that generates all of the
objects of the various classes (e.g., Compartment, CompartmentType) that
define a simulation model. A Model
object is immutable - it should
not change over the course of simulation. Instead, we derive a Run
object class that inherits from a Model
.
initial.conds
Initial Conditions
types
vector of CompartmentType objects
compartments
vector of Compartment objects
lineages
vector of Lineage objects
fixed.samplings
list of Lineage names and sampling times for plotting
initial.conds
Initial Conditions
types
vector of CompartmentType objects
compartments
vector of Compartment objects
lineages
vector of Lineage objects
fixed.samplings
list of Lineage names and sampling times for plotting
new()
Model$new(settings = NA, name = NA)
get.initial.conds()
Model$get.initial.conds()
get.types()
Model$get.types()
get.compartments()
Model$get.compartments()
get.lineages()
Model$get.lineages()
get.names()
Model$get.names(listR6obj)
get.fixed.samplings()
Model$get.fixed.samplings()
clone()
The objects of this class are cloneable with this method.
Model$clone(deep = FALSE)
deep
Whether to make a deep clone.
require(twt)
# get path to example YAML file
path <- system.file('extdata', 'SI.yaml', package='twt')
# load file and parse to construct Model object
settings <- yaml.load_file(path)
mod <- Model$new(settings)
# display summary information (calls S3 print method)
mod
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.