You are on page 1of 3
Seiwa 1g the set of parameter values 8.6 PREDATOR-PREY RELATIONSHIPS 8.6.1 Conceptual Basis and Mathematical Formulation ‘which one species preys upon another. Albothacthings.baingequatronemightonpect (8.32) Ny is the population size of the the prey species, d is the death opulation growth examined in this chapter considers the case in Population Dynamics 245 ber of encounters increases in proportion to the number of predators and Only a fraction of encounters results in a predator capturing its prey, 8.6.2 Implementation Program 8.8, predprey. awe, presents an implementation in gawk of the Lotka-Volterra, Wn 8.31 and Equation 8,32). The program employs fourth- xis. ymments that outline the purpose ‘been hard-wired into the program: ve been entered on the command in the next iteration of the while loop. 8.6.3 Running the Model Program 8.8 can be run from the command line as follows: gawk -€ predprey.awk -v dt-0.01 > predprey.dat » Remember that the values of the main variables are hard-wired in the code and hence the command line. Thus, the population of each species capturing the prey once in every 10 encounters (a =| every two prey that they consume (b = 0.5), Note that output from the computational ‘model is redirected to the file predprey dat in the working directory. Program 8.8: predprey.awk = SS # A simple model of predator-prey interaction based # on the Lotka-volterra equations (see Squations 331 and solved using fourth-order Runge-Kutta numerical tion techniques. # Usage: gawk -£ predprey.awk -v dt=value { > outputFile } secrn( 4 Population density, prey (v2 # Population density, predacet © Deeth sata, seumatce peeing # coctficiont of preatinn toy # bredator efficiency (o) 9: # Growth rate, prey apscies (x) 4 Tino at which simulation sheutd a # Current time sa ee

You might also like