Boomer Manual and Download
PharmPK Listserv and other PK Resources
Previous Page Course Index Next Page

Comparison Between Integration Methods

Comparison between different methods

Table 10.5.1 Table of Comparison between Various Numerical Integration Methods

The results in Table 10.5.1 were determined some time ago when computers were slower. All the methods except Gear's method slow considerably or fail when the stiffness ratio get above 100.

Example Boomer .BAT files (and the resulting .OUT files) demonstrating a simulation of a multi-compartment version of the model shown in Table 10.4.1 can be downloaded (Macintosh, UNIX and DOS). The Runge-Kutta version (rk.BAT) fails with too many steps when ka > 50. The Runge-Kutta-Fehlberg version (rkf.BAT) starts to show problems with error messages when ka > 500. Gear's method (gear.BAT) works with ka = 1.0 x 1012.

Notes on the Use of Different Integration Methods with Boomer

When differential equations are used in Boomer, by specifying rate constants as parameter, the user is presented with the selection of an integration method.

 Method of Numerical Integration

 0) Classical 4th order Runge-Kutta
 1) Runge-Kutta-Gill
 2) Fehlberg RKF45
 3) Adams Predictor-Corrector with DIFSUB
 4) Gears method for stiff equations with PEDERV
 5) Gears method without PEDERV

 Enter choice (0-5) 

For ordinary compartmental problems choice 2 (Fehlberg RKF45) should be chosen as the most efficient. With stiff systems choice 5 (Gears method without PEDERV) is best.

Each of these numerical integration methods requires that the user specify an upper limit of the acceptable error, either as a relative or as an absolute error. In the case of the Fehlberg RKF45 method both types of error are requested.

 Enter Relative error term for
     Numerical integration (0.0001) 

 Enter Absolute error term for
     Numerical integration (0.0001) 

For each of the other methods only one error term is required (relative for Classical 4th order Runge-Kutta and the Runge-Kutta-Gill method and absolute for Adams Predictor-Corrector or Gears method). This can be important when editing a Boomer .BAT file. An additional line may need to be added if switching to the Fehlberg RKF45 method or a line may need to removed if switching from the Fehlberg RKF45 method.

A final point may need to be made regarding the specification of the absolute error term. At times the default value of 0.001 may be too small. Note that even though the concentration calculated may be quite small, for example, 1 - 10 mg/L the number calculated, internally, may be somewhat higher. For example, with a dose expressed as 1000 mg an absolute error of 0.0001 would mean a change in the 7th significant figure. This may stress the method and thus a larger absolute may be more appropriate and necessary. The important thing is to consider how realistic the error value might be for the problem being studied.

Boomer Error Messages

In Boomer the Runge-Kutta method will reduce the step-size automatically if the error specified is exceeded. If this stepsize reduction is greater than a built-in limit and error message will be displayed.

 ** ERROR ** ISTEP =      20000


 *** Fatal error in RK ***
          restart option not selected
      Try another integration method
PAUSE  Press RETURN to quit statement executed

As indicated in the error message another integration may be better.

The Runge-Kutta-Fehlberg may be quite efficient for compartmental pharmacokinetic models. However, with stiff systems the program will rapidly become inefficient and the error message below will indicate this problem.

 IFLAG NOT EQUAL TO 2     4
 Number of differential equations    20
 Value for line 1   -.2850E-04
 X value at beginning of interval    1.764    
 X value at end of interval    2.000    
 Relative error    .1000E-03
 Absolute error    .1000E-03

Adjustments to the requested error might help or alternately Gear's method may be used to complete the analysis.


References
  1. Gear, C.W. 1971 "Algorithm 407 DIFSUB for Solution of Ordinary Differential Equations", Comm. ACM., 14, pp 185-190
  2. Gear, C.W. 1971 "The Automatic Integration of Ordinary Differential Equations", Comm. ACM., 14, pp 176-179

return to the Course index


This page was last modified: Monday, 30th Oct 2017 at 7:02 pm


Privacy Statement - 25 May 2018

Material on this website should be used for Educational or Self-Study Purposes Only

iBook and pdf versions of this material and other PK material is available

Copyright © 2001-2019 David W. A. Bourne (david@boomer.org)