make_MP: Make a custom management procedure (MP)

Description Usage Arguments Value See Also Examples

View source: R/z_MPs.R

Description

Function operator that combines a function of class Assess and a function of class HCR to create a management procedure (MP). The resulting function can then be tested in closed-loop simulation via runMSE.

Usage

1
make_MP(.Assess, .HCR, diagnostic = c("none", "min", "full"), ...)

Arguments

.Assess

A function of class Assess.

.HCR

A function of class HCR.

diagnostic

A character string describing if any additional diagnostic information from the assessment models will be collected during a call with runMSE ("none" is the default). "min" (minimal) will collect information on convergence and "full" will also collect the Assessment object generated by the .Assess. This information will be written to the Misc slot in the MSE object. See example.

...

Additional arguments to be passed to .Assess and .HCR.

Value

A function of class MP.

See Also

HCR_ramp HCR_MSY diagnostic_AM retrospective_AM

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# A delay-difference model with a 40-10 control rule
DD_40_10 <- make_MP(DD_TMB, HCR40_10)

# A delay difference model that will produce convergence diagnostics
DD_40_10 <- make_MP(DD_TMB, HCR40_10, diagnostic = "min")

# MP that uses a Delay-Difference which assumes a Ricker stock-recruit function.
DD_Ricker <- make_MP(DD_TMB, HCR_MSY, SR = "Ricker")

## Not run: 
myMSE <- DLMtool::runMSE(DLMtool::testOM, MPs = c("FMSYref", "DD_40_10"), PPD = TRUE)

str(myMSE@Misc)
diagnostic_AM(myMSE)

## End(Not run)

tcarruth/MSEtool documentation built on Oct. 19, 2020, 6:09 a.m.