You are on page 1of 17

Host Parasite Model I

These are many examples in nature in which a


species of parasite secures its continued
existence by invading a species of host; the
hosts are killed by the parasites which grow
inside them. This type of breeding is done for
example by parasitic wasps and eels.
Variations in population of both the hosts and the
parasites can be observed. When the number of
parasites increases, the number of invaded hosts
increase and obsequently the number of hosts
declines. The decline of the number of hosts
leads to a decline number of parasites. As a
obsequence the number of hosts can increase
according to their normal growth rate.
Description of the Model
If one assume the hosts have a natural excess
of births over deaths equal to a, then the n
umber of hosts x increases in the absence of
para sites in accordance with the following
differential equation :
dx/dt = a*x (1)
The rate of mortality depends on the natural
mortality of the species and the number of
encounters between hosts and parasites. In the
model it is assumed that this is proportional to
the product of the number of parasites and the
number of hosts.
Description of the Model
This is based on the assumption that
theoretically every parasites can invade every
hosts; thus the number of possible invasions is
x*y.
The number of actual invasions is a fraction c of
the maximum number of possible invasions.
Thus the actual rate of increase of the number
of hosts is given by :
dx/dt = a*x – c*x*y (2)
The rate of change of the number of parasites is
giver by the differential equation :
dy/dt = c*x*y – b*y (3)
Description of the Model
As a simplification, it is assumed that every
invasion of a hosts leads to the birth of exactly
one parasites and the parasites multiply only
under such conditions.
The term b*y represents the mortality rate of
the parasites. The number of hosts and
number of parasites as a function of time is
obtained by integrating the differential
equation (2) and (3).
Description of the Model
The constans are :
a = 0.005
b = 0.05
c = 6.E-6
The initial conditions are :
x(0) = 10000
y(0) = 1000
Problem :
The behaviour of the system from T = 0. to
T = 1000. Is to be plotted.
Implementation
The differential equation (2) and (3) which
describe the, system are expressed in the
subroutine STATE.
The two differential equations belong to a
set. It follows that the model contains only
the set NSET = 1.
Implementation
For the hosts :
Number of hosts x = SV(1,1)
Rate of change dx/dt = DV(1,1)
For the parasites :
Number of parasites y = SV(1,2)
Rate of change dy/dt = DV(1,2)
Implementation
Thus the subroutine STATE is as follows :
C *** EQUATIONS FOR SET 1 ***
1 DV(1,1)=0.005*SV(1,1)-0.000006*SV(1,2)*SV(1,1)
DV(1,2)=-0.05*SV(1,2)+0.000006*SV(1,2)*SV(1,1)
RETURN
END
The initial values are provided by the event NE = 1.
The subroutine EVENT is as follows :
C PROCESS EVENTS
C ==============
C
1 SV(1,1)=10000.
SV(1,2)=1000.
CALL BEGIN(1,*9999)
C
RETURN
Implementation
Notes :
* Almost every event which assigns new
values to continuous variables whose
values are obtained by solving
differential equations or alters them
subsequently, should be placed
between two calls of the subroutine
MONITR. In this way the state of the
system before and after the aasigment
is recorded.
Implementation
Exceptions are events which set initial
conditions. The continuous variables have to
value 0 before initialisation. If this value is
recorded by a call of the subroutine MONITR,
this leads to a distortion of the plot output.
* Every change of the continuous variables
which occurs in the subroutine STATE must
be directly followed by the call of the
subroutine BEGIN.
Implementation
Finally the subroutine ANNOUN is used to
schedule the event NE = 1 in section 5 of the
main program “Setting the initial conditions”.
Thus section 5 of the main program has the
following form:
C
C 5. START MODEL
C ==============
C
C SCHEDULE THE FIRST EVENT
C ========================
CALL ANNOUN(1,0.,*9999)
C
Implementation
C START SOURCES
C =============
C
C PROCEED WITH SIMULATION RUN
C ===========================
5500 IF(SVIN.NE.0) CALL SAVIN(*9999)
C
It is wise to print the INTSTA array after every
simulation. It contains statistical information about
the integration. The output is performed by the
subroutine REPRT6. It is called in section 7
“Terminating section” of the main program :
Implementation
C
C 7. TERMINATING SECTION
C ======================
7000 CONTINUE
CALL REPRT6

REPRT6 has no parameters.


The following actions are necessary for the
implementation of the host parasite model :
Implementation
Define the differential equations in
the subroutine STATE
Define the initial conditions in the
subroutine EVENT
Schedule the event NE = 1 in the
main program
Call REPRT6 in the main program
The Input Data
The required input data are read in section 3
of the main program “Input and assignment
of variables” by the subroutine XINPUT from
a file with a logical device number provided
in UNIT1.
The input data is in free format, i.e. numbers
can be input in I-, F- or E-format, and spaces
are ignored.
The Input Data
The input file has the following layout :
TEXT;HOST PARASITE MODEL I/
VARI;TEND;1000./
VARI;EPS;1.E-03/
VARI;ICONT;1/
INTI;1;1;1.0;2;2;0.01;5.;1.E-4;10000/
PLO1;1;0.;1000.;10.;21;001001;001002/
PLO3;1;*H;HOST;*P;PARASITE/
END/
The Input Data
The input consists of 4 sections
which are given the names TEXT,
VARI, INTI and POLT in the data
records. The input is in free
format. Values are separated by
“;”, and records are terminated by
“/”
SIMULASI
(GRAFIK)

You might also like