Performs a simplified or "shortcut" stock assessment by truncating an operating model stock object to the current data year, computing a selected stock metric, applying stochastic deviations, and returning the resulting indicator together with the truncated stock and updated tracking object.
shortcut.sa(
stk,
idx,
metric = "ssb",
SSBdevs = met %=% 1,
devs = SSBdevs,
args,
tracking,
...
)An FLStock-like object representing the stock available to the
shortcut assessment. The object is truncated to the terminal data year
dy.
An index object. Currently included for interface compatibility with other assessment functions, but not used directly inside this function.
A character string naming the function used to compute the
assessment metric from stk. Defaults to "ssb". The named function is
called via base::do.call().
An object containing deviations to apply to the computed
metric. Defaults to met %=% 1, i.e. a unit deviation structure matching
the dimensions of the computed metric. Typically this is an FLQuant or
compatible object.
Deprecated alias or shorthand for SSBdevs. Defaults to
SSBdevs.
A list-like object containing dimensions and assessment settings
needed by FLCore::spread(). In particular, this function assumes that variables
such as dy, y0, ay, and stock become available after calling
spread(args).
A tracking object updated in-place through to record convergence of the shortcut assessment.
Additional arguments passed to the metric function named in
metric.
A named list with components:
stk: the stock object truncated to the terminal data year dy;
ind: an FLQuants object containing the derived indicator series,
named according to metric;
tracking: the updated tracking object with convergence information
recorded.
This function is intended for use inside management procedure workflows where a full assessment model is not run, but an index or assessment quantity is approximated from the operating model using a direct transformation of stock state and observation-error-like deviations.
The function proceeds as follows:
values in args are unpacked using FLCore::spread();
the stock object is truncated to end=dy using window();
the requested metric is computed by calling the function named in
metric on stk;
the result is collapsed across units using FLCore::unitSums();
stochastic deviations are applied over the period from y0 to dy;
the resulting quantity is wrapped in an FLCore::FLQuants() object and named
with the selected metric;
convergence is recorded in tracking by setting
"conv.est" to 1 for year ay and biological unit stock.
the function named in metric exists and accepts stk as its first
argument;
devs or SSBdevs are dimensionally compatible with the metric
computed from stk;
idx is currently unused but may be retained for consistency with
other assessment-method signatures.
devs is currently used to build the indicator, even though
SSBdevs is the more explicit argument name.
if (FALSE) { # \dontrun{
# dataset contains both OM (FLom) and OEM (FLoem)
data(plesim)
# Create shortcut deviances for F and SSB
devs <- shortcut_devs(om, Fcv = 0.3, Fphi = 0.6)
# Set control: sa and hcr
control <- mpCtrl(list(
est = mseCtrl(method=shortcut.sa,
args=list(devs=devs$SSB)),
hcr = mseCtrl(method=hockeystick.hcr, args=list(lim=0,
trigger=14000, target=0.18))))
# Runs mp
tes <- mp(om, ctrl=control, args=list(iy=2021, fy=2026))
} # }