Main Lab Handout (Control of simulations, Simulations to try, Review questions)
Instructions for what to do and include in your lab notebooks - Spring 2000
COMPUTER SIMULATIONS OF POPULATION GROWTH MODELSThe computer programs and instructions were written by Keith Landa. I. General Introduction to Simulations
Mathematical models play a key role in understanding the complex processes occurring in ecological systems. One perennial problem in introductory (and higher-level) ecology courses is how to get students to understand these theoretical models. Often there is only sufficient time in lecture to cover the general form of a model and to simply state the results of manipulating the model, without going into any of the details. To really understand these models, you have to be able to plug in various values for the model parameters in order to see how model behavior is affected. This would be a tedious operation to do by hand (or with a calculator). The purpose of these simulations is 1) to allow you a convenient mechanism for "playing" with some of the population models presented in lecture and 2) to present the results in a graphical form that makes it easier to see what the results are. The simulations are set up in a stand-alone tutorial format, so that you may use them as you need them, to aid your study of this material. The simulations include online descriptions of the models used to create the simulations as well as documentation on how to control the programs.
Some general features of using the programs are described in this introduction. The remaining sections describe the population growth simulation, including the general questions addressed by the models and suggested sets of parameters to plug into the models. The purpose of this write-up is to get you started on the particular simulations; whatever additional "playing" you do depends on what you feel you need to do to understand the material involved.
Starting the Program
To start the simulations, simply place the floppy disk into the floppy drive of an IBM compatible microcomputer (such as the ones the University has at its computer workstations). If you are running Windows, open the Run dialog box from the Start button, type "a:\ecology.exe" in the dialog box, and click OK. If you are at the DOS prompt, simply type "a:\ecology.exe" and hit <enter>.
When the program begins to run, you will first see a title screen. A main menu then appears, listing the simulations available to be run. You choose a simulation to run by typing the first letter of the option desired or using the arrow keys. Enter "Y" to confirm your choice or "N" to select a different choice. Finishing with one simulation returns you to the main menu, where you can select another simulation or Quit.
All of the simulations follow the same basic format. First, a title screen with a brief explanation of what the simulation does is displayed. Then the program offers to show you more detailed information (either the theoretical background for the model being simulated and/or a demonstration of how the simulation works). Then the simulation begins, with a set of parameter values preset. You may then alter the model parameters as you wish.
There are currently 5 simulations that can be selected from this program:
1. Single species logistic growth: to determine how carrying capacity (K), growth rate (r), random fluctuations in K, disturbance, nonlinear density-dependence, time lags and harvesting affect the population dynamics of a single species.
2. Age-structured population growth (life tables): inputs age-specific survivorship and fecundity; calculates lx, Ro, r, and generation time and plots population size and age structure over time.
3. Interspecific competition isoclines: inputs carrying capacities, growth rates, competition coefficients, density-independent mortality for two species; plots zero-growth isoclines, initial trajectories for different areas around the phase-plane, population size of each species over time, and joint population trajectory; allows disturbances of specified magnitude to be applied automatically to one or both species.
4. Mark-recapture population estimation: shows how sampling effort and violations of the assumptions of the mark-recapture model affect the accuracy of population estimation.
5. Worms: for relaxation (!).
Control of the Programs
There are two main ways that you interact with these simulations:
1. There are a number of menus throughout the simulations, which offer a variety of options for controlling the action of the program. To select any of these options, simply press the letter or number associated with it in the menu. Pressing the <ENTER> key is not necessary, and may cause unwelcome results.
2. When you select menu options for changing model parameters, the program will prompt
you, at the bottom of the screen, for the new values you want to enter. Type any of the
'-.1234567890'. Use the <DEL> key or the <LEFT ARROW> key to erase individual characters that are wrong. If you want to start over from scratch, press the <ESC> key. When you've finished typing in the new value, enter it by pressing the <ENTER> key. Pressing the <ENTER> key without first typing in a new value leaves the current value of the parameter unchanged.
II. Single Species Logistic Growth Simulation
This program simulates single species logistic growth, using the basic Lotka-Volterra equation with modifications. In addition to being able to set the carrying capacity (K) and growth rate (r) for the species, you can also set a range over which the carrying capacity varies (random K), the linearity and time lag with which density-dependence operates, and the type and amount of harvesting to be applied to the population.
Introduction to the Logistic Equation
One of the great interests of ecologists is prediction of the size of a population at some future time. Knowing this size may have some interest in itself, as, for example, knowing how many cod will be present next fishing season, or how many gypsy moths will be in the forests next spring. A different purpose would be to predict the population at some future time, assuming present conditions, and then apply some different conditions and observe the result. For example, we might wish to learn the effect of the introduction of a possible competitor. A similar aim would be to predict population sizes in the future under two or more different sets of conditions, for example the deer population next spring if hunting of all deer, or just male deer, were allowed.
Some population models are quite complicated. However, we are going to consider some relatively simple forms. These forms are worth study for several reasons. Although they are simple, many populations are adequately modeled with these population growth equations. Other populations require more complicated models, which are often built from these simpler models. Thus, in order to understand the complex models later, we need to first understand the simpler ones.
The basic model we will start with is the exponential equation: dN/dt = rN
This is a differential equation that describes the change in numbers (dN) through time (dt). This rate of change is a function of the population size and the per capita rate of increase, r.
Note the units. The overall rate (dN/dt) is in individuals per unit time, or sometimes in density of individuals per unit time. Density could be rabbits per acre, or for aquatic organisms, perhaps algal cells per liter or per cubic meter. The unit of time depends on the organism. For humans, a unit of a year might be appropriate, whereas a unit of a minute might not. The opposite would be true if we were talking about bacteria or viruses.
The units we want for our rate of growth will determine the units for r and N. N has units of individuals or density of individuals; this is the population size at any time. r has units of net increase in individuals (or density of individuals) per individual present, per unit time. Note the important difference between the rate of population growth (or absolute rate, dN/dt) and the per capita rate (r). N is comparable to your bank balance. r is the interest rate (compounded continuously): the dollars the bank pays per dollar in your balance. dN/dt is the rate of increase of your balance.
Many populations grow according to the exponential equation for a while. If they grew this way for a long time, they would become infinitely large. This never happens. Instead, population growth slows down, often following the form:
dN/dt = rN (1 - N/K)
This is usually called the logistic equation, or sometimes the Verhulst-Pearl equation. Note the similarity to the exponential equation. Both have the terms r and N. The logistic equation also has a factor (1 - N/K). This is sometimes called environmental resistance, or a damping factor. K is a maximal population size, called the carrying capacity. If N is small compared to K, then (1 - N/K) is nearly 1, and the rate of growth will be almost the same as in exponential growth. If N is the same as K, (1 - N/K) is zero, and the population stays the same size. If N is greater than K, the population increase will be negative; that is, the population will get smaller.
Notice how the two kinds of rates behave in the logistic equation. The damping factor affects the per capita rate of increase such that the per capita rate always decreases with every addition of another individual (N). However, at small population sizes, the absolute rate of population increase actually increases with increasing density. Although the rate per individual goes down, the larger number of individuals leads to higher rates of population increase. This is true until an intermediate population size, when the per capita rate gets so low that the absolute growth rate begins to decrease. The standard logistic equation is symmetrical; the absolute rate of population growth increases steadily up to K/2 and then decreases to zero at K.
Keep in mind the meaning of the parameters and their units. N, for example is population size (individuals) or population density (individuals / unit area), and the numbers may be arbitrary. N = 100 could be the total population or the number per square feet or cubic mile. Because of that, do not be concerned that the population grows when N is one. If we chose an area twice as large, N would be 2. In the same way, the rates and times we use are arbitrary and could be days, weeks, or years, as appropriate. The one important point, if we want to compare our numbers to real situations, is to keep all parameters consistent. If you are modeling elephants per square mile, a K of 1000, a time unit of years, and an r of 1 would be fantastical. Maybe a K of 10 and an r of .1 would be better.
Other forms of the logistic equation
The basic logistic model makes several unrealistic assumptions, which can be relaxed by including some new parameters in the model. We will discuss several modifications of the logistic equation that make it more realistic for some situations. You will see here, and elsewhere in theoretical ecology, that making a model more realistic usually means making it more complicated and also usually means making it less generally applicable to situations other than that modeled.
1. Time lags.
Recall that the per capita growth rate in the logistic is damped by the factor (1 - N/K), where N is the population size at any one instant. Some species respond to the population size at some time previous to the present. Such a response to conditions at a previous time is called a "time lag." This can easily be added into the logistic equation by using the population size, N, at some previous time (t (tau) units earlier), in the damping factor:
dN/dt = rN(1 - Nt/K)
Be sure to note where N and where Nt are used in this equation.
The size of the time lag (tau) will affect the behavior of the population growth. If tau is very small, there will be little difference from the behavior of the standard logistic equation. If tau is very large, the population may get many times as large as K and then crash to zero. In between, time lags can result in damped oscillations, stable limit cycles, population "outbreaks" and other complicated dynamics. With the simulation you can map out what combinations of parameters lead to what types of dynamics.
2. Random fluctuations in the carrying capacity.
The carrying capacity for a population is a combination of intrinsic species traits (the average resource use per individual, behavioral interactions, etc.) and extrinsic environmental factors (actual resource availability, habitat heterogeneity, etc.) Because the environment is variable, it is unlikely that carrying capacity will remain constant from one time interval to the next. The simulation allows you to set the average value for the carrying capacity (Kmean), and the range over which K varies (Krange). The carrying capacity used at any particular time in the simulation Krandom varies uniformly from Kmean - (1/2)Krange to Kmean + (1/2)Krange:
dN/dt = rN(1 - N/ Krandom)
In general, random fluctuations in the carrying capacity usually do not change the overall dynamics of population growth, beyond introducing some variability in the population size from one time period to the next. The degree of variability depends on the values of the other model parameters. In addition, fluctuations in the carrying capacity can modify the response of the population to time lags.
3. Non-linear density dependence.
In the standard logistic equation, per capita growth (dN/N dt) declines linearly with increasing population size. For some organisms (e.g., territorial animals), per capita growth is relatively unaffected by increasing population size until the population nears the carrying capacity, at which point per capita growth declines rapidly. Some organisms show the opposite pattern. The presence of even a few conspecifics drastically lowers the per capita growth rate; additional conspecifics have additional but reduced effect. Non-linear density dependence can be introduced by adding an exponent (q = theta) to the N/K damping term:
dN/dt = rN[1 - (N/K)q] (5)
Theta greater than 1 corresponds to the case where density dependence does not have a strong effect until the population nears K; theta less than 1 results in even low population sizes having a strong density dependence. For the standard logistic equation, theta is equal to 1.
Non-linear density dependence has some effect on the shape of the curve as the population approaches the carrying capacity. The most obvious effect of theta, however, is on the shape of the curve relating population growth rate (dN/dt) to population size. You will recall that the standard logistic equation is symmetrical; population growth rate is zero both when N equals 0 and when N equals K. The maximum rate of population increase occurs at exactly K/2. If theta is less than one, the maximum rate of population growth occurs at a population less than K/2. If theta is greater than 1, maximum population growth occurs above K/2.
4. Harvest of the population.
This model allows you to simulate harvesting of the population. Three harvesting modes are available. You may set a constant number of individuals to be harvested each time interval (roughly corresponding to a quota system) or a constant proportion of the population to be harvested or a constant proportion of the carrying capacity to be harvested.
Krebs, C.J. 1994. Ecology: the Experimental Analysis of Distribution and Abundance. Harper Collins College Publishers; New York, NY. 801 pp. (See pages 203-216, 349-366.)
Ricklefs, R.E. 1990. Ecology. W. H. Freeman; New York, NY. (See pages 326-331,
Wilson, E. O. and W. H. Bossert. 1971. A Primer of Population Biology. Sinauer.
Control of the simulations
This simulation plots population size over time, given the model parameters used and the initial population size, for up to 100 time intervals. The MAIN MENU for this simulation has 6 options: run, alter, erase, value-table, harvest-mode, and exit. For some of these options, another menu appears on the screen if it is chosen
Run. Type "r" to run the simulation. During a run, a different menu will appear on top of the screen. Type "p" to temporarily stop the simulation from plotting the population trajectory. This is useful for recording model values (N, dN/dt, per capita growth) at particular times during a run. Pressing any key will cause the simulation to resume where it left off, with no changes in model parameters, population size or time. You can use the pause option to "single-step" through a run. With the simulation "paused", quickly pressing "p" twice will cause the simulation to proceed to the next time interval and stop. Typing "s" will stop the run and return your to the main menu. Typing "v" will cause the table with model values in the lower left to appear (if it was initially set off) or to disappear (if it was initially set on). The simulation runs much more quickly if model values are not shown.
Alter. Type "a" to change any of the model parameters listed on the upper left part of the screen. Use the arrow keys to choose the parameter(s) you want to change. You will be prompted at the bottom of the screen for a new value. "f" to finish making changes and to return to the MAIN MENU.
Erase. Type "e" to erase the old plot(s). Leaving them on the screen to compare with the new plot is most useful for comparing how different values of initial population size affect the population trajectory, or for comparing random fluctuations in K from one run to another.
Value-table. Type "v" to change whether or not the model values will be shown in the lower left of the screen. You can also type "v" during a run to reverse the initial condition.
Harvest-mode. Three harvest modes are available. Type "n" to have a constant number of individuals harvested and enter a number in the model parameters table. Type "p" to harvest a constant proportion of the current population size and enter a proportion (0-1.0) in the model parameters table. Type "s" to harvest a constant proportion of the carrying capacity and enter a proportion (0-1.0) in the model parameters table.
Exit. Type "x" to quit the logistic growth simulation. To prevent accidental exit from the simulation, you will be asked to confirm that you want to quit ("y" for yes, "n" for no). You will then be returned to the original simulation menu, where you can select another simulation or quit the program entirely.
Simulations to try
Here are some questions to get you started using the population growth models on the computer and to help you understand how different parameters affect population growth. For our purposes, you only have to concern yourself with simulations 1 through 6.
1. Start with the given values (r = .2, K = 125, no time lag or non-linearity in the density dependence). Rerun these parameters with different values for No, the initial population size. Use several initial values that are less than and several values that are greater than 125 (K). Why is the carrying capacity called a stable equilibrium?
2. To see how the basic logistic model responds to different r and
K values, start with the given r = .2 and K = 125. Then, keeping K constant and starting
with No of 1, choose different values of r (.1, .5, 1, 2) and compare how rapidly the
populations approach K.
Next, for r = .2 and No = 1, choose several different values of K (50, 200, etc.) and compare how rapidly the populations reach K. Which has a greater effect on the time it takes an initially small population to reach its carrying capacity, the size of K or the size of r?
3. To see the different kinds of dynamics that can result as a consequence of changing r alone, do the following: Keeping K constant and using No = 1, systematically vary r from its default value of 0.2, and determine (a) the value of r (to at least 2 decimal places) at which dynamics go from monotonic damping (i.e., a smooth logistic curve) to damped oscillations; (b) the value of r at which dynamics go from damped oscillations to stable oscillations; and (c) the value of r at which dynamics go from damped oscillations to chaos (apparently random or aperiodic fluctuations).
4. To simulate exponential growth, set the carrying capacity to 500 and the y axis scale to 10. Use an initial population size of .1 and values for r of 0, .03, .05, .1, .2. The feature to notice with exponential growth is that population growth rate (dN/dt) continues to increase with increases in the population size. You can see this graphically in that the slope of the population trajectory gets steeper as the population grows. This can result in very explosive population growth.
5. Now let's add a time lag (tau = t) to the logistic model and examine population responses. Effects will be determined by both r and tau so you should vary both of these parameters. Set K and the y axis scale so that the carrying capacity is on the graph. Given r = .2, try time lags of 0 (the basic logistic), 1, 2, and 3. Continue until the population damps to K or you can tell what type of dynamic behavior the set of parameters produce. Now increase r to 1, and repeat. Try r = 2 or r = 3. What is the trend in population fluctuations as you increase tau? as you increase r? Describe how r and tau interact (i.e., under what conditions does adding a time lag make a difference and under what conditions does adding a time lag have little effect?). Did any populations go extinct? Which values give a high risk of extinction? Do you think tau is likely to be greater than 2 in populations? Why or why not? Which situation may be most likely to fit a population of gypsy moths? of elephants?
6. To examine the effect of fluctuations in the carrying capacity, choose a range that is nearly equal to the average value (such as a mean of 120 and a range of 100, which would result in K varying between 70 and 170). This is an extreme case but will make the effects more apparent. With a moderate r (say .2) and no time lags, start the population at a low level. The effect of random K probably does not show up until the population has grown above low levels. (Why not? Refer back to equation 4.)
Rerun the set of parameter values (using r=0.2), starting with an initial population size equal to the mean carrying capacity. Use the pause option to single-step through 20 time intervals, recording the population size at each time interval (you will find N in the list of MODEL VALUES along the left side of the screen). (Alternatively, you can run the simulation 20 times, and record the final value of N fro each simulation.) Calculate the mean and standard deviation of these population sizes. Repeat this procedure for r = 1.0 and 3.0 only (previously, you were asked to use several other values of r), always using the same carrying capacity value and K-range. How does the mean population size vary with different values of r? How does the standard deviation (variability) of population size vary with r? From these observations, how do you think growth rate affects an organism's ability to "track" changes in the carrying capacity over time?
7. Fluctuations in K can interact with time lags. Run the following sets of parameters:
K = 120 (range = 0), r = 1, tau = 2, No = 120
K = 120 (range = 10), r = 1, tau = 0, No = 120
K = 120 (range = 10), r = 1, tau = 2, No = 120
What types of dynamics occur for each set of parameters? Why do you suppose (in biological terms) that fluctuations in K and tau interact in the way that they do?
8. Non-linear density dependence. To see the effect of theta, start with K = 150, r = .2, no time lag and theta = 1. Use a low initial population size to generate the standard monotonic approach to K. Single-step the simulation, using the pause option, so that you can record population size (N), population growth rate (dN/dt) and per capita growth rate (dN/N dt) for each time interval. Repeat, changing theta to .5 and then 5. How does theta affect the shape of the population growth trajectory? Plot population growth rate against population size, and per capita growth rate against population size for the different values of theta. How does theta affect the shape of these curves?
Theta can also affect the response of the population to time lags. Run the simulation with r = 1, tau = 3 and theta = 1. You should get the population going through outbreaks followed by periods of low abundance. Now vary theta (.5, .2, .1, 2). What happens to the type of dynamics exhibited by the population as you vary theta?
9. Add harvesting to the model. Using K = 150, r = .2, tau = 0 and theta = 1, start with the population at K and harvest 2 individuals each time interval. Why does the population decline and then stabilize at a value below K? Repeat, harvesting 4,6,8 or 10 individuals per time interval. What eventually happens to the population? Repeat, harvesting a constant percentage of the population (5, 10, 15, 20) and then a constant percentage of K (5, 10, 15, 20).
What is the maximum sustained yield for the parameters above (K = 150, r = .2)? Vary K and r to determine how maximum sustained yield is affected by these parameters. (For a given value of K, plot maximum sustained yield against r. Do the same for K, given some value of r.) Add a time lag or non-linearity. Do these affect the maximum sustained yield?
Finally, harvesting can dampen oscillations due to time lags. Run the simulation with r = 1 and tau = 3. With no harvesting, start with a low initial population size. What type of oscillations does the population exhibit? Repeat, harvesting 5, 10, 15 percent of the population each time interval. What happens to the behavior of the population as you increase the percent harvest?
When you finish with the computer simulations, you should be able to answer the following types of questions. You will receive an additional handout with specific questions that you are to answer and hand in to be graded.
1. Which is more effective in reducing the final size of a pest population: reducing r by 1/2 or reducing K by 1/2?
2. If you reduce K for a population, how does this change the time for the population to reach K?
3. Which species population below will recover (i.e. reach K) from a catastrophe faster? Which of these populations will reach N = 500 faster?
a population with r = 2, K = 1000 or a population with r = 2, K = 100?
a population with r = 1, K = 1000 or a population with r = 2, K = 1000?
a population with no time lag or a population with a long time lag?
4. What happens if a population overshoots K? Why?
5. How do time lags affect population dynamics in this logistic model? What happens as the relative time lag is increased? Why? What are some possible causes of time lags? Do you think time lags are likely to occur in natural populations?
6. If a population has a time lag, will the fluctuations be greater or smaller if the population has a high r? Are elephants or gnats more likely to show chaotic population fluctuations? Which is more likely to go extinct: a population with a relatively short or a relatively long time lag?
7. If you were raising grouse that establish territories, would you harvest your birds to a population greater or smaller than K/2? Why? Initially, would the grouse population grow faster or slower if they did not form territories and the density effects were linear on per capita population growth rate?