This creates a closure that simulates the model
simulator.c.Rd
This is a shorter alternative to the runModel function (C backend).
Usage
simulator.c(
experiments,
modelName,
parMap = identity,
noise = FALSE,
approximateSensitivity = FALSE,
method = 0
)
Arguments
- experiments
a list of experiments to simulate: inital values, inputs, time vectors, initial times
- modelName
a string (with optional comment indicating an .so file) which points out the model to simulate
- parMap
the model will be called with parMap(parABC); so any parameter transformation can happen there.
- noise
boolean variable. If noise=TRUE, Gaussian noise is added to the output of the simulations. The standard deviation of the Gaussian noise is equal to the measurement error. If noise=FALSE the output is the deterministic solution of the ODE system. noise and sensitivity calculations are mutually exclusive.
- parABC
the parameters for the model, subject to change by parMap.
Details
It returns a closure around: - experiments, - the model, and - parameter mapping
The returned function depends only on parABC (the sampling parameters). The simulation will be done suing the rgsl backend.
Examples
# model.sbtab <- SBtabVFGEN::sbtab_from_tsv(dir(pattern="[.]tsv$"))
# experiments <- SBtabVFGEN::sbtab.data(model.sbtab)
# parABC <- SBtabVFGEN::sbtab.quantity(model.sbtab$Parameter)
# modelName <- checkModel("<insert_model_name>_gvf.c")
# simulate <- simulator.c(experiments, modelName, parABC)
# yf <- simulate(parABC)