Skip to content

Commit eb157fe

Browse files
committed
Updated files for package building
1 parent a4c19d0 commit eb157fe

21 files changed

Lines changed: 431 additions & 72 deletions

Meta/vignette.rds

477 Bytes
Binary file not shown.

R/data.R

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
#' Default Operating Model for Alaska Sablefish
2+
#'
3+
#' Dataset containing demographic matrices, observation
4+
#' process parameters, and initial numbers-at-age for
5+
#' the alaska sablefish population. This data is used as
6+
#' the base for all operating models used in this
7+
#' package.
8+
#'
9+
#' @format list containing OM components
10+
#'
11+
"sable_om"
12+
13+
#' Sablefish assessment
14+
#'
15+
#' A dataset containing sablefish assessment results.
16+
#' This data is used for defining the historical recruitment
17+
#' timeseries.
18+
#'
19+
#' @format A list containing assessment data
20+
#'
21+
"sablefish_assessment_data"
22+
23+
#' Random Recruitment OM Object
24+
#'
25+
#' An operating model object that will generate future
26+
#' recruitment by randomly resampling from teh historical
27+
#' recruitment timeseries
28+
#'
29+
#' @format An operating model object
30+
#'
31+
"om_rand_recruit"
32+
33+
#' Cylic Recruitment OM Object
34+
#'
35+
#' An operating model object that will generate future
36+
#' recruitment via a cyclic pattern of Beverton-Holt SRRs.
37+
#' The first cycle is a low recruitment phase lasting 20
38+
#' years, the second cycle is a high recruitment phase
39+
#' lasting 5 years.
40+
#'
41+
#' @format An operating model object
42+
#'
43+
"om_bhcyclic_recruit"
44+
45+
#' Crash Recruitment OM Object
46+
#'
47+
#' An operating model object that will generate future
48+
#' recruitment via a recruitment crash for the first 20
49+
#' years, and then resort to resampling from the historical
50+
#' recruitment timeseries.
51+
#'
52+
#' @format An operating model object
53+
#'
54+
"om_crash_recruit"
55+
56+
# F40 Managament Procedure
57+
#'
58+
#' An example management procedure that replicates
59+
#' the NPFMC F40 harvest control rule policy that
60+
#' is operationally used to manage sablefish in
61+
#' Alaska.
62+
#'
63+
#' @format A management procedure object.
64+
#'
65+
"mp_f40"
66+
67+
# Harvest Cap Managament Procedure
68+
#'
69+
#' An example management procedure that applies
70+
#' a 25,000 mt cap on annual harvest to the
71+
#' operational F40% harvest control rule policy.
72+
#'
73+
#' @format A management procedure object.
74+
#'
75+
"mp_25cap"
76+
77+
# Stability Constraint Managament Procedure
78+
#'
79+
#' An example management procedure that applied
80+
#' a symmetric 5% stability constraint to the
81+
#' operational F40% harvest control rule policy.
82+
#'
83+
#' @format A management procedure object.
84+
#'
85+
"mp_5perc"

R/recruitment_utils.R

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ regime_recruits <- function(mus, cvs, nyears, regime_length, starting_regime, se
8484
}
8585

8686
#' Beverton-Holt stock recruitment relationship
87-
#' #'
87+
#'
8888
#' Defines a function factory for yieding recruitment from a Bevrton-Holt
8989
#' stock recruitment relationship, parameterized using steepeness. Initial
9090
#' call to this function sets up a new function that takes the current SSB
@@ -116,6 +116,23 @@ beverton_holt <- function(h, R0, S0, sigR, seed){
116116
}
117117
}
118118

119+
#' Regime Beverton-Holt stock recruitment relationship
120+
#'
121+
#' Defines a two-regime recruitment function where each regime
122+
#' is defined by a Beverton-Holt stock recruitment relationship
123+
#' with differeing levels of R0 or sigR.
124+
#'
125+
#' @param h steepness (0.2 <= h <= 1.0)
126+
#' @param sbpr spawning biomass per recruit at unfished conditions
127+
#' @param R0s vector of unfished recruitments (one for each regime, max 2)
128+
#' @param sigRs vector of recruitment variability (one for each regime, max 2)
129+
#' @param nyears total number of years of recruitments to generate
130+
#' @param regime_length vector of length of each regime
131+
#' @param starting_regime regime to start with (0 = first regime, 1 = second regime)
132+
#' @param seed random seed for reproducability
133+
#'
134+
#' @export bevholt_regimes
135+
#'
119136
bevholt_regimes <- function(h, sbpr, R0s, sigRs, nyears, regime_length, starting_regime, seed){
120137
set.seed(seed)
121138
function(ssb, y){

R/setup_mse_options.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' Set MP object list items to reasonable default values.
44
#'
5-
#' @export setup_mse_options
5+
#' @export setup_mp_options
66
#'
77
#' @example
88
#'
@@ -45,6 +45,14 @@ setup_hcr_options <- function(){
4545
)
4646
}
4747

48+
#' Setup MSE Options Object
49+
#'
50+
#' Set MSE optios list items to reasonable default values.
51+
#'
52+
#' @export setup_mse_options
53+
#'
54+
#' @example
55+
#'
4856
setup_mse_options <- function(){
4957
return(
5058
list(

man/average_annual_dynamic_value.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/average_annual_value.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/beverton_holt.Rd

Lines changed: 1 addition & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/bevholt_regimes.Rd

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/get_saved_model_runs_old.Rd

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/mp_25cap.Rd

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)