Skip to content

Commit

Permalink
CRAN 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
quang-huynh committed Sep 16, 2021
1 parent e9c473a commit 0115225
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Version: 1.2.2
Authors@R: c(person("Quang", "Huynh", email = "quang@bluematterscience.com", role = c("aut", "cre")),
person("Tom", "Carruthers", email = "tom@bluematterscience.com", role = "aut"),
person("Adrian", "Hordyk", email = "adrian@bluematterscience.com", role = "aut"))
Date: 2021-09-03
Date: 2021-09-16
Maintainer: Quang Huynh <quang@bluematterscience.com>
Description: Simulation tools for closed-loop simulation are provided for the 'MSEtool' operating model to inform data-rich fisheries.
'SAMtool' provides a conditioning model, assessment models of varying complexity with standardized reporting,
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ The latest release of the SAMtool package is available on [CRAN](https://CRAN.R-

## SAMtool 1.2.2
- The `make_interim_MP` function is added to generate MPs that adjust the TAC between periodic assessments using the index.
- An additional posfun to `SP` is added to avoid negative biomass situations.
- Fix sampling of recruitment deviations for projections in `RCM` so that the mean is one in normal space. This error was apparent when autocorrelation was very large.
- Assessment and RCModel objects now save the package version as attributes.
- Shortcut function now reports year-specific reference points for the harvest control rule.
- HCR returns TAC = NA when a control point or target point is negative.

## SAMtool 1.2.1
- `HCR_segment` allows for creating control rules with any number of linear segments.
Expand Down
2 changes: 1 addition & 1 deletion R/HCRs.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ HCR_segment <- function(Assessment, reps = 1, OCP_type = c("SSB_SSB0", "SSB_SSBM
}
}

if(exists("Fout", inherits = FALSE) && !is.na(F_out)) {
if(exists("Fout", inherits = FALSE) && !is.na(Fout)) {
if(Fout > 0) {
if(!exists("SE", inherits = FALSE) || !length(SE)) SE <- 0
FM <- trlnorm(reps, Fout, SE/Fout)
Expand Down
10 changes: 6 additions & 4 deletions R/z_MPs.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

#' Make a custom management procedure (MP)
#'
#' Function operator that combines a function of class \code{Assess} and a function of
#' class \code{HCR} to create a management procedure (MP) with constant TAC between assessments.
#' Use \link{make_interim_MP} to use an interim procedure to adjust the TAC between assessments using an index. The resulting function
#' can then be tested in closed-loop simulation via \code{\link[MSEtool]{runMSE}}.
#' Function operator that creates a management procedure (MP) by combining an assessment model (function of class \code{Assess}) with
#' a harvest control rule (function of class \code{HCR}). The resulting function can then be tested in closed-loop simulation via
#' \code{\link[MSEtool]{runMSE}}. Use \code{make_MP} to specify constant TAC between assessments; the frequency of
#' assessments is specified in \code{OM@@interval}. Use \code{make_interim_MP} to use an interim procedure to adjust the TAC between
#' assessments using an index (Huynh et al. 2020), with the frequency of assessments specified in argument \code{assessment_interval} when
#' making the MP; ensure that \code{OM@@interval <- 1}.
#'
#' @param .Assess Assessment model, a function of class \code{Assess}.
#' @param .HCR Harvest control rule, a function of class \code{HCR}.
Expand Down
10 changes: 6 additions & 4 deletions man/make_MP.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0115225

Please sign in to comment.