Description Usage Arguments Examples
Title
1 2 3 |
fish |
a matrix of fish numbers by site (rows) and by age (columns). Can easily be generated by |
quota |
fishable quota, can be estimated using |
ages |
age of catchable fish |
distance |
matrix of distance from each cell to each |
fish_licenses |
number of licenses per region in |
mpabefore |
Logical vector, TRUE if closed to fishing before |
mpaafter |
Logical vector, TRUE if closed to fishing during |
writefish |
If TRUE, will write the |
writefishcatch |
If TRUE, will write the |
writekg |
(logical) If TRUE, will write the number of kg of fish caught for each cell/community to the |
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) |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.