Calibrates fleet catchability coefficients (and optionally costs) so that
the simulated fishery matches user-specified exploitation rates or depletion
levels. This should be called after create_critter and
create_fleet, and before simmar.
Usage
tune_fleets(
fauna,
fleets,
years = 50,
tune_type = "f",
tune_costs = TRUE,
depl_tol = 0.025
)Arguments
- fauna
Named list of critter objects from
create_critter.- fleets
Named list of fleet objects from
create_fleet.- years
Integer. Number of years to simulate when running to equilibrium for calibration. Higher values give more accurate equilibria but take longer. Default
50.- tune_type
Character. Tuning mode:
"f"or"explt"(equivalent) to match exploitation rates, or"depletion"to match SSB/SSB0 targets. Default"f".- tune_costs
Logical. If
TRUE(default), calibratescost_per_unit_effortfor each fleet to match itscr_ratio. Set toFALSEto skip cost calibration (e.g. forconstant_effortfleets where costs are irrelevant).- depl_tol
Numeric. Relative tolerance for depletion-mode validation. A warning is issued if the achieved depletion for any species differs from its target by more than this fraction. Default
0.025(2.5 percent).
Value
A named list of tuned fleet objects (same structure as the input
fleets), with updated catchability, spatial catchability, and
(if tune_costs = TRUE) cost parameters. Original fleet models
are preserved.
Details
Tuning modes
"f"/"explt"Sets each fleet's catchability so that the total instantaneous fishing mortality matches each species'
init_explt(fromcreate_critter). Catchability is computed analytically frominit_explt,p_explt(each metier's share), and effective effort. Fast (one simulation for cost calibration only)."depletion"Uses a numerical solver (
nleqslv, Broyden method) to find fishing mortalities that drive each species to its targetdepletion(SSB/SSB0, set increate_critter). Slower (multiple simulations). Warns if achieved depletion differs from the target by more thandepl_tol.
What gets calibrated
Catchability: Each metier's
catchabilityandspatial_catchabilityare set so that fishing mortality on each species matches the target. The share of total F allocated to each fleet is controlled by the metier'sp_expltvalues (normalised to sum to 1 across fleets for each species).Costs (when
tune_costs = TRUE): Runs an equilibrium simulation and calibratescost_per_unit_effortandeffort_referencefor each fleet so that the cost-to-revenue ratio matches the fleet'scr_ratio. Relevant foropen_accessandsole_ownerfleet models.
Workflow
Deep-clones fleet metiers to avoid mutating the caller's objects.
Temporarily sets all fleet models to
"constant_effort".Normalises
p_expltacross fleets for each species.Sets initial catchability estimates.
Runs equilibrium simulation(s) and calibrates costs.
(Depletion mode only) Solves for catchability via
nleqslvand validates achieved depletion.Restores original fleet models and returns tuned fleets.