How Long Must I Wait? Features That Do and Do Not Impact Computation Time for EPA's PBPK Model Template
Methods:
The PBPK Model Template was created using the MCSim model specification language (Bois, 2009), translated into C and compiled for use in R. Simulations were performed using R version 3.6.0 on a Dell Precision T7610 running Red Hat Enterprise Linux Workstation release 7.9. Tests were conducted with PBPK models for dichloromethane and chloroform for two-week continuous or periodic oral and inhalation exposures (4 scenarios). We assumed one 6-h inhalation event per day, 5 d/w, for periodic inhalation exposures and six bolus ingestion events, 7 d/w, for periodic oral exposures. All continuous exposure simulations used a single collection of ten thousand (10k) sets of anatomical and physiological parameters representing 10k random human subjects. Because periodic exposure simulations were significantly slower than continuous exposures, only 1k of the virtual subjects were sampled for those tests. To account for variation in computer speed due to background processes that could not be controlled, each timing experiment was repeated 5 times each on 2 separate days, and the mean and variance of the required CPU time calculated. The effects of model features on simulation speed were thereby determined.
Results:
Switching between model features can be accomplished either through use of a logical ternary operator (equivalent to an “if-then-else” statement) or multiplication by pseudo-parameters set to 1 or 0. Use of the ternary operator was slightly faster, but by less than 2%. Reducing the number of state variables output for a simulation also had little effect. Simulation time for continuous exposures increased linearly with the number of time points specified for output, but for periodic exposures simulation time only increased 1% when the number of time-points was increased 10-fold. Structuring the model code to only compute body-weight-dependent parameters once at the start of a simulation resulted in a 30% time-savings, even compared to simulations where body weight was constant, but then growth of an individual over time cannot be modeled. Because the DCM and CF models have relatively few compartments and model structures, 19 or 20 of the optional state variables could be removed, increasing the speed by 20-35%. Surprisingly, including an explicit lung tissue compartment increased computational time by 35-75% when periodic oral exposures were simulated, but only 10% for periodic inhalation exposures.
Conclusions:
While additional state variables clearly increase the simulation time, the difference from adding or removing only a few is not likely to be large. Most other options evaluated had minimal benefit and significantly reducing the number of optional variables would significantly reduce the PBPK Model Template’s flexibility. Computational time can easily be improved by reducing the number of output time-points when determining steady-state dose metrics from continuous exposures. The single largest time savings achieved for all simulation types resulted from removing the time-dependence of calculated parameters that depend on body weight, so the additional effort of maintaining such a version may be worthwhile. The large impact of an explicit lung tissue compartment suggests further research on how best to represent the lung when calculation of the corresponding dose metric is needed.