harvest: Title

Description Usage Arguments Examples

Description

Title

Usage

1
2
3
harvest(fish, quota, ages = min_age_catch:maxage, distance, fish_licenses,
  mpabefore, mpaafter, writefish = TRUE, writefishcatch = TRUE,
  writekg = TRUE, results_folder, y, time, suffix = NA)

Arguments

fish

a matrix of fish numbers by site (rows) and by age (columns). Can easily be generated by initpop

quota

fishable quota, can be estimated using link{estimatequota}

ages

age of catchable fish

distance

matrix of distance from each cell to each fish_communities

fish_licenses

number of licenses per region in fish_communities

mpabefore

Logical vector, TRUE if closed to fishing before time

mpaafter

Logical vector, TRUE if closed to fishing during time

writefish

If TRUE, will write the fish remaining for each cell/age to the results_folder

writefishcatch

If TRUE, will write the fish caught for each cell/age to the results_folder

writekg

(logical) If TRUE, will write the number of kg of fish caught for each cell/community to the results_folder

results_folder

Path to the directory where results are stored

y

current year

time

years during which model results are recorded (i.e. not during spin-up time)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#' # create a fish matrix
fish <- initpop(initial_abun=250*10^6,cells=length(BESTMPA_domain),maxage=50,rate=0.7)
# calculate distances from shore
distance <- gDistance(spTransform(fish_communities,proj),BESTMPA_domain,byid = T)
# number of licenses per region in fish_communities
fish_licenses <- c(866, 4714, 3002, 879, 963)
# define MPAs
mpa <- sample(c(TRUE,FALSE),length(BESTMPA_domain),replace=TRUE)
nompa <- rep(FALSE,length(BESTMPA_domain))
# quota
quota <- estimatequota(fish,maxage=20,y=2001,tot_time=2001:2071,FMSY=0.28,FMSY_buffer=0.667)
# go fishing!
fish <- harvest(fish,quota,ages=4:20,distance,fish_licenses,mpabefore=nompa,mpaafter=mpa,writefish=FALSE,writefishcatch=FALSE,writekg=TRUE,results_folder='',y=2001,time=time)

remi-daigle/BESTMPA documentation built on May 27, 2019, 4:55 a.m.