Simulator: A R6 class that is the super class for all numerical...

SimulatorR Documentation

A R6 class that is the super class for all numerical simulators

Description

A R6 class that is the super class for all numerical simulators

A R6 class that is the super class for all numerical simulators

Details

The main method is 'simulate'.

the Simulation class is an abstract class. It's constructor should not be explicitly called.

Active bindings

model

a read-only field returning the simulation code for the model.

Methods

Public methods


Method new()

constructor

Usage
Simulator$new(model)
Arguments
model

the model to simulate


Method simulate()

simulate the model

Usage
Simulator$simulate(t, y0, parms = NULL, vars = names(y0), ...)
Arguments
t

a numeric vector of times.

y0

a numeric vector of initial conditions.

parms

a numeric vector of parameter values.

vars

a character vector specifying the variable names to be returned. A variable can be either a compartment or a substitution

...

extra arguments to be passed to the 'ode' method substitutions that depend on the compartments are calculated and returned

Returns

a data frame which rows correspond to each time in 't', and columns correspond to the variables specified in vars.


Method clone()

The objects of this class are cloneable with this method.

Usage
Simulator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


junlingm/REpiSim documentation built on June 15, 2025, 7:36 a.m.