% =========================================================================
%  Biological_Models_Harvesting.m
% 
%  Harvesting model  
%
%  This is an m-file for the study of a single population model with
%  harvesting: Logistic model + harvesting
%
%  dN/dt = rN(1-N/k) - EN = F(N)
%
% EN: Harvesting yield per unit time
%
% =========================================================================
 
% Clears history and command window 
close all; clear all;
 
% Continouus model with harvesting
% Investigate the long-time behavior of the model using
% different values of N0 and r
 
% model paramters
% -- plot limits
xmin = 0; 
xmax = 1.0;
K = 1; % population is normalized, so capacity is 1
y0 = @(t) K;
% -- various initial populations
N0_1 = 0.2;
N0_2 = 0.5;
N0_3 = 1.5;
% growth rate
r = 1.0;
%r = 1.3;
%r = 0.7;
% -- various harvesting rates
e1 = 0.05;
e2 = 0.5;
e3 = 0.75;
e4 = 1.0;
 
% Function F(N)
fn0 = @(N) 0;
fn1 = @(N) (r*N*(1-N/K)-e1*N);
fn2 = @(N) (r*N*(1-N/K)-e2*N);
fn3 = @(N) (r*N*(1-N/K)-e3*N);
fn4 = @(N) (r*N*(1-N/K)-e4*N);
 
figure (1);
hold on;
fplot (fn1, [xmin, xmax], 'b');
fplot (fn2, [xmin, xmax], 'r'); 
fplot (fn3, [xmin, xmax], 'g'); 
fplot (fn4, [xmin, xmax], 'black'); 
fplot (fn0, [xmin, xmax], 'black'); 
%fplot (y0, [0, 5], 'black');
legend('E1=0.05','E2=0.5','E3=0.75','E4=1.0');
xlabel('Population');
ylabel('F(N)');
hold off;
 
