[PAGE 1]
SUDMARY

BIONOD is an operational system specifically designed to make it convenient for unsophisticated conputer users to study models of dynamic systems. The system features a high degree of interaction, user-oriented model-definition languages, and flexib1e, in-depth model structuring. It employs a graphics console comprising a television screen, a data tablet, and a keyboard.

A BIOOD user may represent a model by drawing block diagrams and handprinting or typing text; he receives immediate feedback about the system's interpretation of his actions. Each component of a model block diagram may be defined by another block diagram; this facilitates organizing models into meaningful substructures. A usar ultimately defines each component block by analog-computer-like elements, algebraic, differential, or chemical equations, and/or Fortran statements. A modelcr may.thus define his model in whatever terminology is meaningful to him. Displayed curves are continually and automatically updated during model simulation. A user may stop the simulation and plot different variables, change scales, or alter parameter values, and then either continue simulating or revise the description of his mode1.

This report demonstrates BIOMOD by presenting a scenario of how a user might describe and simulate a drug-effect model, briefly describes the system implementation, and discusses experience with users.

Annroved Sor Releasa

[PAGE 2]
Medications and their prescribed dosages are designed to maintain
a critical amount of drug in the blood for a specified period of time.
The conventional method for determining optimal dosages involves numer
ous laboratory experiments. If the drug effects can be modeled, how
ever, a more efficient method is to experiment by running computer
simulations. 4

One technique for maintaining the prescribed amount of drug is to use a capsule containing a large number of differently coated pellets. The pellets dissolve .at different times, so that, as drug leaves the blood, it is replaced by drug released by newly dissolved pellets. Garrett and Lambert [8] have proposed the following model to describe this situation. A capsule comprises a number of pellet populations with different mean times of release, The rate of drug release for each population is assumed to be normally distributed (with the same standard deviation for each population) about the mean time of release for that population. The rate of edding drug to the body is therefore specified by a sum of normal distributions. The transfer of drug through the body is described by

$$
d \operatorname { r } \operatorname { u } \operatorname { g } \longrightarrow \bigodot \bigodot \bigodot \bigodot \big . \xrightarrow { \mathbb { k } _ { \mathbb { G } \mathbb { I } } , \mathbb { B } } \infty \bigodot \big . \xrightarrow { \mathbb { k } _ { \mathbb { B } , \mathbb { U } } } \mathinner { \Large \odot } \bigodot
$$

where GI refers to the gastrointestinal tract, B to the·blood, and U to the urine and other excretory parts of the body; this means that $\odot ^ { \prime }$ drug flows from GI to B at rate $k _ { G I , B }$ and from B to U at rate $k _ { B , \theta } .$ Thus, for exatple,

$$
\dim \limits _ { \tt B } / \tt d t = k _ { G I , B } \ o _ { G I } - k _ { B , U } \ o _ { B }
$$

where D is the amount of drug in B, and $\tt _ { B }$ $\mathfrak { d } _ { \mathtt { G I } }$ the amount of drug in GI. Given this description together with the requisite parameter .values, BIOMOD can be used to simulate the model. Note that the following dialogue describes only one of nauy pessible ways of reachins the same goal, and that BIOMOD does not force the user to take actio ia

-5.

II. A MODEL FOR EVALUATING DRUG ADMINISTRATION POLICIES

[PAGE 3]
When using BICliCD, wo colunicate via a data tablet pen and a keyboard, Fhe pen's location on the tablet is always indicated by.a dot displayed in the corresponding location on the tolevision screen. BIOMOD's interpretation of user pen actions depends on where the pen is placed and on what is currently displayed ou the screen. We nay handprint characters in most arcas. As we write, a displayed "ink" track appears to flow from the pen; each time we complete a character, its track is replaced by a stylized character. We can change a character by writing another over it. Some symbols are used for editing; for example, we may use a caret to insert text, or we may scrub with the pen to delete text. Some areas displayed on the screen act as pushbuttons; if we "push" one of these (by touching the pen down), the system performs the indicated action. If we push a displayed arrow, a continuous action takes place, such as the rescaling of a set of curves. Some figures can be "dragged"; if we "touch" one of these and move the pen, the displayed figure follows the pen's motion, We may type (with the keyboard) in any area where writing is possible. The keyboard cursor may be positioned either with the pen or with keyboard control keys.

To create our model, we enter our identification, name our model DRUGS, then begin constructing the model. Because it has two major components, we first draw two rectangles; these are replaced by stylized'function boxes. We write CAPSULE in one box and names of parts of the body in the other box, and then draw a flowline to connect them. This diagram (Fig. 2) provides not only a picture of our model, but also a means of defining the two components of the model separately.

To define the capsule component, we first push the DEFN button on its box. The system replaces the block diagram with a list of languages that we may choose from to define the component. The languages are block diagrams, mathematical equations, chemical equations, and Fortran statements. We choose block diagrams so that we can define the capscle as a set of boxes, each representing a pellet population. This ability to define a box by another block diagram enables us to organize a model as a hierarchical collection of a number of components at difforent levels. We" dra feur boxes and write PILL on the top lina

-6.

[PAGE 4]
-7.

[PAGE 5]
of each to reprosent four pellet populations. le nane a funczion box in this way whenever we anticipate using the sume function repeatedly.

Because each population is defined by a normal distribution, we indicate that we want to define the PILL function with mathematicol equations. BIOMOD responds by displaying a form for writing algebraic and differential equations. We assume that the probability of a pellet dissolving in an interval about time t is given by the probability density function

$$
p = \frac { 1 } { 1 + \sqrt { 2 \pi } } e ^ { - ( t - \pi ) ^ { 2 } / 2 0 ^ { 2 } }
$$

Using this function to approximate the drug release rate by a deterministic variable, we write

$$
\begin{array} { r l r } { \mathbb { P } } & { = } & { 1 / \left( \mathbb { S } \mathbb { I } \mathbb { G } ; \mathbb { A } ^ { \neq } \mathbb { S } \mathbb { Q } \mathbb { R } \mathbb { T } \left( 2 ^ { \neq } \mathbb { P } \mathbb { I } \right) \right) ^ { \neq } \mathbb { E } \mathbb { X } \mathbb { P } \left( - \left( \mathbb { T } \mathbb { I } \mathbb { X } \mathbb { E } - \mathbb { X } \mathbb { E } \mathbb { A } \mathbb { X } \right) \ast \texttt { t } 2 / \left( 2 ^ { \neq } \mathbb { S } \mathbb { I } \mathbb { G } \mathbb { X } \mathbb { A } ^ { \neq \star } 2 \right) \right) } \end{array}
$$

The system analyzes this statenent and immediately responds with the message

UNBALANCED PARENTHESES

We then add a closing parenthesis to correct the statement. We also realize that we should parameterize the amount of drug released by each pellet population, so we insert DOSAGE after the equals sign and scrub the 1. The display now 2ppears as in Fig. 3.

BIONOD has generated separate lists of the defined and undefined variables; TIME does not appear because it is always the simulation independent variable, These lists enable us to indicate which variables have different meanings or values each time we use the function. We indicate that the names (and therefore the values) of PI, SIGMA, and DOSAGE are the same each time we use the PILL function. This is because PI is a constant, and because we assume that tha standard deviation and dosage amount are the same for each population. On the other hand, we indicate that MEAN may have a different value for each pellet population.

·8.

[PAGE 6]
.9.

[PAGE 7]
Now that we have defined the PILL funetion, we are ready to use it to define the iudividual populations. Wo push a button to get back to our diagram of the four PILL boxes, then push the DEFN button on one of these. Because PILL is now defined, BIOMOD displays

$$
\begin{array} { r l r } { \mathfrak { P } } & { + } & { \cdot } \\ & { \mathfrak { X } \mathrm { G A X } } & { + } \\ & { \mathbb { P } { \mathbf { I } } } & { + \ \mathfrak { P } { \mathbb { I } } } \\ & { \mathbb { S } { \mathrm { I G A } } } & { \ast \ \mathfrak { S } { \mathrm { I G A A } } } \\ & { \mathbb { D } { \mathfrak { O S A G E } } } & { + \ \mathfrak { D } { \mathfrak { O S A G E } } } \end{array}
$$

for us to provide the names of the output and mean of this particular population. We write Pl next to P +, to name this output P1, and write MI next to MEAN , to name this mean time of release Ml. We similarly establish the correspondence between the names of variables in the other three pellet populations and the names (P and MEAN) used when defining the function PILL.

We can describe the flow of the drug through the body by chemical equations because these are mathematically equivalent to mass transport equations. When we push the DEFN button or. the box that describes the body, and select chemical equations, BIOMOD presents an appropriate form. According to our original model description, we would like to write

$$
\mathbb { D } _ { \mathtt { G F } } \xrightarrow { \mathtt { k } _ { \mathtt { G F } , \mathtt { B } } } \mathbb { D } _ { \mathtt { B } } \xrightarrow { \mathtt { k } _ { \mathtt { B } , \mathtt { U } } } \mathbb { > \ } \mathbb { D } _ { \mathtt { U } }
$$

or

$$
\mathbb { P } _ { \mathtt { G I } } \quad \underbrace { \mathtt { k _ { G I } } , \mathtt { B } } _ { \mathtt { 0 . } } \ge \quad \mathtt { D _ { B } }
$$

$$
\mathbb { D } _ { \texttt { B } } \texttt { \quad } \ll \frac { \texttt { k } _ { \texttt { B } , \texttt { U } } } { 0 _ { \texttt { - } } } \hat { \tau } > \quad \mathbb { D } _ { \texttt { U } }
$$

where 0. indicates that there is no backward flow. BIOMOD requires that we linearize each equation, and write tha rate coefficients and equatic.s

-10.

[PAGE 8]
S KGIB 0. DGI = DB

S KBU 0. DBDU

Here S (for slov reaction) means that BIOMOD should derive integral equations from our equation. Since the pellets release drug into the gastrointestinal tract, we also write

G DGI

,P1+P2-+P3-+P4

This statement (vith G for gain) indicates that the gain of DGI, i.e.,. .the increased rate of change ef DGI due to drug entering the body from outside, is equal to the sum of the rates of drug relzase from the four pellet populations.

The maodel is now defined except for paraneter values. When ve indicate that we are ready to provide these values, BIOMOD displays the names of model variables and parameters in two separate lists (Fig. 4). Names such as DGIo indicate initial values; they are derived froz the chemical equations by BIOMOD. We enter the values given or implied by Garrett and Lambert. We assune that some drug is immediately released 'into the gastrointestinal tract and therefore set DGlo to 5; the other drug amounts are initially zero. In order to minimize storage requirements, BIOMOD limits the number of variables whose values are saved during simulation and the number of parameters whose values can be modified during simulation. Since this ,model is small, we indicate that we want to save values of (and possibly plot) all the variables, and that we might want to modify values of all parameters except PI.

model. We now indicate that we would like to simulate it. BIONOD first produces a CSMP/360 [2] program that describes our model and provides for graptic display of the results. CSMP, in turn, generates a Fortran program, which is compiled and linked with other programs required to run the simulation. If an error is detected at one of these steps, progren lirtincs and exrer wessazss ar: displayed en the sersen; otharuise, our ealy aacaners o: the inter.iiete stepe is via displayad

-11

[PAGE 9]
-12-

[PAGE 10]
nessages. The time required for the translation depeuds on the load on the (qultiprogrammed) computer; gencrally it is about three minutes.

Our pRUGS podel translates successfully, so the form shown in Fig. 5 is displayed on the screen, As in the other forms, software pushbuttons appcar across the top. The central area is for selecting numerical integration methods, modifying parameter values, examining variable names and values, or plotting graphs. The areas to the lcft and below the central area are for specifying the y and x axes of the graphs.

We expect the values of our model variables to change smoothly and

over several units to TIME, so we choose a simple integration method--

Simpson's method with step-size = O.1. This is a fixed step-size method,

so the information regarding variable step-sizes disappears. Before

studying how to use a multi-pellet capsule, we want to ensure proper

model behavior when there is initially some drug in the gastrointest-

inal tract, but no capsule. To eliminate the capsule drug ve push the

PARAMETERS button to display the list of modifiable parameters in the

central area, then overwrite the value of DOSAGE, changing it to 0.

Next we display the list of plottable variables. Because we are most

interested in the amount of drug in the gastrointestinal tract, blood,

and urine, we drag the names DGI, DB, and DU to the y axis. We want to

watch the model for several simulated hours, so we change the upper range

of TIE (in the small box at the lower right of the central area) from 1.

to 7. We push PLOT; now we are ready to plot DGI, DB, and DU from 0. to

1. against TIME from 0. to 7. hours.

We push RESTART and the sinulation begins running. We see (from the curves) that DB, and later DU, are being generated; the "NOW X = " number changes continuously to indicate the current value of siqulated TINE. Because LGI is plotted off scale along the upper boundary, we touch the pen dowm to stop the simulation. In order to determine the range of DGI, we return to the display that lists the variables along with their current, minimum, and maxiuum values. The meximum value of DGI is 5. (its initial value), so we write 5 over the 1 that specifies the upper y-axis value, then redisplay the curves, The curves are now nieay sealed. Ne continuc the situl-tton, thsn stop it shen we see that uoarly ell the drus hes anrerec tha urine, and valuas cze chanzin

0

-13-

[PAGE 11]
-14

[PAGE 12]
slowly. We assume, from thc curve's reasonable appcarance (Fig. 6), that we described at least the body component of the model correctly, and our choice of integration uethod is adequate. We sce fron the curve labeled D3 that, as expected, the drug remains in the blood for only a short time.

We reintroduce the capsule drug by changing DOSAGE back to 3., then restart the simulation and watch the curves being continuously updated as it runs. Once it becomes apparent that the capsule is not effective, i.e., that the value of DB drops too lov, we stop the sinulation. Apparently (Fig. 7), the drug is not released from the pellets in time to replace the drug that leaves the blood. To correct this, we change the wean times of release from 2., 4., 6., and 8. to 1., 2., 3., and 4. We then rerun the simulation and get much better results. The amount of drug in the blood should be greater than 2.5. In order to determine if this is achieved, we place the pen down in the central area to establish an x-y meter, then drag this meter to a place where Y (corresponding to DB-as we11 as DGI and DU) is equal to 2.5 (Fig. 8). Our choice of means was good, but they need to be adjusted to maximize the total duration of capsule effectiveness..

While changing the means for further trials we realize that rather than controlling four means, we would prefer to deai only with the first rean and the interval between mean times of release. To reformulate the model in this way, we return to its description and add another box to the definition of the capsule component. In this box.we write

$$
M _ { 2 } = M I + I N I _ { 2 } \mathrm { = \ 3 I 2 }
$$

and similar ecuations for M3 and M4. This replaces the parameters M2, M3, and M4 with the single parameter INTVAL, which we set to 1. and mark modifiable. Once this is accomplished, we retranslate the model, then continue to resimulate it and change parameters until we have established a satisfactory drug formulation and administration policy.

-15

[PAGE 13]
-16.

[PAGE 14]
-17

[PAGE 15]
-18-