run_scenario: Run Scenarios Function to run scenarios in parallel. Returns...

Description Usage Arguments Examples

Description

Run Scenarios Function to run scenarios in parallel. Returns three things, a list of all the output from conduct_survey, cpue summarized by each value in loop_over, and summarized data for each year.

Usage

1
2
run_scenario(ctl_start, loop_over, ncores = 1, to_change, add_index = FALSE,
  par_func)

Arguments

ctl_start

Output from make_ctl function

loop_over

Vector of values to loop over

ncores

Number of cores to run in parallel, default is 1

to_change

Specify which value to modify in lapply statement. Should be the values in

add_index

Specify add index or not, for locations

par_func

Turn parallel run option on or off loop_over and be a character string

Examples

1
2
3
4
5
ctl1 <- make_ctl(distribute = 'patchy', mortality = 0, move_out_prob = .5,
      nfish1 = 0, nfish2 = 0, prob1 = .01, prob2 = 0, nyear = 15, scope = 1, seed = 4,
      location = one_loc, numrow = 1, numcol = 1)  
ttest <- run_scenario(ctl = ctl, loop_over = seq(100, 1500, by = 100), to_change = 'nfish1', 
  ncores = 6)

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