LAB 1

Exploring growth and harvesting

In this lab, we will design a model for sardine growth with harvesting. We will use WINPP/XPP to solve the equations numerically. We will use a logistic model for the sardines and study the effects of constant and percentage harvesting. The equations without harvesting are:

dP/dt = r P(K-P)/K

P(t) is the population of sardines, r/K is the growth rate at low populations and K is the carrying capacity. The units are in millions of tons. The carrying capacity is roughly 6 million tons and the rate is about 0.2 per year.

Creating an equation file

First we will create an equation file for the model. You should use an editor that produces text files (Notepad on Windows PCs will work and EMACS on Unix). Open a file called "sardine.ode" and type the following lines in it:
#   sardine model
dP/dt = r*P*(K-P)/K
parameter r=0.2,K=6
P(0)=3
@ ylo=-1,yhi=10
done
Lines beginning with # are comments. Parameters are declared with parameter statements. The differential equations are typed in like you would expect as are initial conditions. Statements starting with the @ symbol define graphing and other parameters. These two just define the low and high limits of the y-axis. All parameters and initial conditions are changeable within the program.

Running the file

In Unix, type in xpp sardine.ode or if you are using the version on the UNIX lab machines, type ~phase/xpp sardine.ode . If you are using Windows, click on the WINPP icon and load the file from there. If you have typed in the equation correctly, the program will fire up. If you haven't, click here to download the above equation.

In Windows click on Run Go to solve the equations and in UNIX, click on Init. conds Go. There are windows labeled Parameters and Initial Data that you can edit to change the parameers. In Windows, you can click on the Go button to solve it after changing them while in UNIX, you should click on OK and then on Init. Conds. Go in the main window. Only the last curve is kept in memory but you can freeze up to 20 curves. In Windows choose Graphics Keep Curve and select Autofreeze and the OK. In UNIX, click on Graphics Freeze Auto Freeze. Try several different initial conditions, say P=1,3,10.

To get hardcopy, you can either capture the screen in Windows or UNIX or save a postscript file and print it out. In UNIX type Graphics Postscript and choose a file name. In Windows choose File Print Postscript.

To add axes or change the axes, in Windows, use the Graphics View menu and in UNIX, use Viewaxes 2D.

Clear all the graphs you have frozen by clicking on Graphics Keep Delete All in Windows or Graphics Freeze Remove all in UNIX. Now, vary the rate parameter keeping the initial conditions P(0)=2. Use rates of 0.2, 0.5, 1, 2, 5. How does it change the shape of the curve.

Adding harvesting

We will add harvesting to the model. There are two strategies for harvesting, constant harvesting and proportional harvesting. In constant harvesting, the same number is taken every year while in proportional, a fraction of the current population is take. Here is the new model:

dP/dt = r P(K-P)/K -Q-h P

In this case Q is the constant rate of harvesting and h is the rate of proportional harvesting. Here is the new ODE model, called "sardine2.ode."

#   sardine model
dP/dt = r*P*(K-P)/K-Q-h*P
parameter r=0.2,K=6
parameter Q=0,h=0
P(0)=3
@ ylo=-1,yhi=10
done
Click here to download this version. Answer the following questions

Now set the constant rate Q=0 and change the proportional rate, h. Answer the following questions: