Executes an NLME simulation
simmodel.RdExecutes an NLME simulation
Arguments
- model
PK/PD model class object.
- simParams
Simulation parameters. See
NlmeSimulationParams. Ifmissing, default parameters generated by NlmeSimulationParams() are used.- params
Engine parameters. See
engineParams. The common parameters include: sort, ODE, rtolODE, atolODE, maxStepsODE. Ifmissing, default parameters generated by engineParams(model) are used.- hostPlatform
Host definition for model execution. See
hostParams. Ifmissing, simple local host is used.- runInBackground
Set to
TRUEto run in background and return prompt.- ...
Additional class initializer arguments for
NlmeSimulationParams, or arguments available insidehostParamsorengineParamsfunctions. IfengineParamsarguments are supplied through bothparamsargument and additional argument (i.e., ellipsis), then the arguments inparamswill be ignored and only the additional arguments will be used with warning. IfhostParamsarguments are supplied through bothhostPlatformargument and additional argument, then its slots will be overridden by additional arguments. In addition, ifNlmeSimulationParamsarguments are supplied through bothsimParamsargument and additional argument, then its slots will be overridden by additional arguments.
Value
returns job properties if runInBackground is TRUE;
if runInBackground is FALSE and the function is called in interactive mode,
the resulted simulated tables wil be loaded and presented as a list;
if runInBackground is FALSE and the function is called in non-interactive mode,
the list returned will have just the full paths of the tables generated.
Examples
if (FALSE) { # \dontrun{
SimTableObs <- tableParams(
name = "SimTableObs.csv",
timesList = "0,1,2,4,4.9,55.1,56,57,59,60",
variablesList = "C, CObs",
timeAfterDose = FALSE,
forSimulation = TRUE
)
simParams <- NlmeSimulationParams(
numReplicates = 2,
simulationTables = SimTableObs
)
# Define the model
model <- pkmodel(
numComp = 2,
absorption = "Extravascular",
ID = "Subject",
Time = "Act_Time",
CObs = "Conc",
Aa = "Amount",
data = pkData,
modelName = "PkModel",
workingDir = tempdir()
)
host <- hostParams(
sharedDirectory = tempdir(),
parallelMethod = "NONE",
hostName = "local",
numCores = 1
)
results <- simmodel(model, simParams, hostPlatform = host)
# with seed given additionally:
results <- simmodel(model, simParams, hostPlatform = host, seed = 3527)
} # }