run_sim: Run Simulation

Description Usage Arguments Examples

Description

Define arguments for hook and line simulations; arguments the same as make_ctl function Used in initialize_population

Usage

1
2
3
4
5
run_sim(numrow = 10, numcol = 10, nfish = 10000, distribute = "uniform",
  maxfish = 10, percent = 0.3, area = NULL, seed = 300,
  location = data.frame(vessel = c(1, 1, 2), x = c(3, 3, 8), y = c(3, 5, 8)),
  scope = 1, nhooks = 5, ndrops = 5, process = "equal_prob", p0 = 0.4,
  nyear = 10, browser = FALSE, cpue_method = "average")

Arguments

numrow

Number of rows in matrix

numcol

Number of columns in matrix

nfish

Number of fish to allocate among matrix

distribute

Specify fish distribution to be 'uniform', 'patchy', or 'area' specific

maxfish

Maximum number of fish that can be sampled at a time; default is 10

percent

percentage of area to sample. Only necessary if distribute == 'patchy'; default is 0.3

area

Specify area to distribute fish, options are 'upperleft', 'upperright', 'lowerleft', 'lowerright', 'upperhalf', 'lowerhalf', 'righthalf', 'lefthalf' Only necessary if distribute == 'area'

seed

Set seed if distribute == random, defaults to 300

location

Data frame of locations with column for vessel, rows, and columns of fish are to fish in.

scope

the scope of fishing movement, default to 1 so fish in surrounding 1 cells can move in; default is 1

nhooks

number of hooks at the smallest sampling size; default is 5

ndrops

number of drops, default is 5 following hook and line protocol; default is 5

process

specify process by which fish are sampled, options are 'multinomial', 'hypergeometric', and 'equal_prob'. 'equal_prob' is based on CIE comments from 2012.

p0

Probability that fish detects gear, used in the hook_prob function; default is 0.4

nyear

Number of years in survey; default is 10

browser

Switch to turn on browser for debugging

cpue_method

Method of aggregating cpue. For use in calc_cpue function. Currently options are 'average', '75hooks' to aggregate by hooks, and 'weighted_average' is in development

Examples

1
2
run_sim(nhooks = 15, seed = 200, nfish = 1000, nyear = 15, distribute = 'patchy', 
       percent = .5, cpue_method = '75hooks')

peterkuriyama/hlsimulator documentation built on May 25, 2019, 1:51 a.m.