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.
# sardine model dP/dt = r*P*(K-P)/K parameter r=0.2,K=6 P(0)=3 @ ylo=-1,yhi=10 doneLines 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.
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.
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 doneClick 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:
Use calculus to find the rate h which maximizes this total. (That is find the maximum of h P1. Note that P1 depends on h.)