Load the dll of an IQRmodel and attach the pointer
reload_DLLIQRmodel.Rd
For use in parallellization with foreach
reload_DLLIQRmodel(model)
Arguments
- model
an IQRmodel
Value
the same model with updated attribute "address.IQRmodel"
Examples
if (FALSE) {
ncores <- 2
cluster <- parallel::makeCluster(ncores, type = "FORK")
doParallel::registerDoParallel(cluster)
foreach(i = 1:2) %dopar% {
model <- reload_DLLIQRmodel(model)
IQRtools::sim_IQRmodel(model,
simtime = seq(0,1000),
FLAGoutputsOnly = FALSE,
dosingTable = IQRtools::IQRdosing(TIME = c(0,0),
ADM = c(1:2),
AMT = c(500, 400)))
}
parallel::stopCluster(cluster)
doParallel::stopImplicitCluster()
}