# 1 Introduction

This document summarizes the new developments of the DLMtool R package to extend its capabilities to model fisheries with multiple stocks and multiple fishing fleets, and describes the application of the newly developed extension to three case-study fisheries from the California Department of Fish and Wildlife (CDFW).

DLMtool was developed as an R package designed to make management strategy evaluation (MSE) accessible to data-limited fisheries. The DLMtool operating model (OM) assumes a single stock (e.g., usually female component of the population) and a single fishing fleet (i.e., all fishing fleets are modeled together in aggregate). The MSEtool R package was developed as an extension to DLMtool for the purpose of allowing more complex features typical of more data-rich fisheries to be included in the modeling framework, such as quantitative stock assessments and complex spatial arrangements.

MultiMSE was developed to extend the modeling framework to include more complex biology (e.g., separate male and female populations, and hermaphroditism), interactions between multiple stocks (e.g., MICE models for evaluating ecosystem interactions), and options for fleet-specific management (e.g., separate recreational and commercial fleets). MultiMSE was developed as a proof-of-concept, to evaluate the viability and practicality of including more complex life-history patterns, and flexible management options within the DLMtool framework.

The aim of this project was to further develop the MultiMSE extension so that it can used to evaluate the performance of management options for CDFW fisheries with sexually dimorphic growth (male and female stocks), stock complexes (multiple species managed as a single unit), and fleet-specific management for fisheries that are exploited by fleets with different characteristics.

The purpose of this document is to describe the newly developed features of the model and the application of the multi-stock & multi-fleet model to three CDFW case study fisheries: 1) Rock Crab, 2) Lobster, and 3) Halibut, and to identify any remaining issues with applying the model to these fisheries.

## 1.1 New Package Structure

As mentioned above, the multi-stock & multi-fleet model was initially developed as a proof-of-concept and included in the MSEtool R package. Early on in this project it became clear that the development of the multi-stock & multi-fleet model required a substantial re-structure of the code in the DLMtool and MSEtool packages.

The new package structure now includes 3 R packages:

• MSEtool (v3.0.0): The MSEtool package has been completely revised and now includes all functions for generating, simulating, and projecting single stock OMs (previously in DLMtool) and multi-stock OMs (previously in earlier version of MSEtool). This new version of MSEtool includes all existing functions for single stock OMs and replaces the earlier versions of the DLMtool R package. This version of MSEtool is only compatible with DLMtool v6+.

• DLMtool (v6.0.0): This new version of DLMtool is now only a collection of data-limited management procedures. This version requires MSEtool v3+ as a dependency.

• SAMtool (v1.0.0): The Stock Assessment Methods toolkit is a new package that contains the data-rich and data-moderate assessment methods and management procedures that were previously available in earlier versions of MSEtool. SAMtool also contains the operating model scoping function that has been updated and re-named RCM (Rapid Conditioning Model; previously SRA_scope). SAMtool requires MSEtool v3+ as a dependency.

Development versions of the three packages are available to be installed from GitHub.

The Rtools software is required to install the new package versions from GitHub. We also recommend using the latest version of R (at least R 4.0.0).

While only MSEtool v6.0.0 is required to run the multi-stock, multi-fleet MSE, we recommend also installing both the new version of DLMtool and SAMtool so that the data-limited and data-rich management procedures are available to use.

The three packages can be installed directly from GitHub. This only needs to be done once (and repeated only if the development versions of the packages are updated):

# install.packages('devtools') # run this if devtools isn't installed
library(devtools)
install_github('Blue-Matter/MSEtool')
install_github('Blue-Matter/DLMtool')
install_github('Blue-Matter/SAMtool') 

At the beginning of each new R session, the 3 packages need to be loaded:

# load package into R session (needs to be done for each new session)
library('MSEtool') 
## Loading required package: snowfall
## Loading required package: snow
library('DLMtool')
library('SAMtool')
##
## Attaching package: 'SAMtool'
## The following object is masked from 'package:MSEtool':
##
##     userguide

We intend to publish the three new and updated packages on CRAN in the next few weeks, together with a new global package called openMSE. openMSE will act as an umbrella package that requires MSEtool, DLMtool, and SAMtool as dependencies; i.e., installing openMSE from CRAN will automatically install MSEtool, DLMtool, and SAMtool and make all MSE functions and MPs available.

# 2 Rock Crab Case Study

The rock crab case study involves three species, Brown, Red, and Yellow, which are managed as a single stock complex. Male and female rock crab have different growth patterns and mature at different sizes, and modeling all stocks together will involve 6 separate stocks.

Given that there are no interactions that are being modeled between the species, and the management options being explored by CDFW are focused on size regulations and effort controls, it may not be necessary to model the three stocks simultaneously. Wherever possible, we recommend limiting the number of stocks that are modeled together, as each additional stock significantly increases the run time of the model and may lead to increased convergence issues.

This case study includes the female and male stocks for the Red rock crab. This analysis can be repeated for the Brown and Yellow rock crab case studies.

The case study can be developed further if CDFW wishes to explore management options that will affect the dynamics of the three species simultaneously.

## 2.1 Set up MOM Object

### 2.1.1 Import Stocks and create Stock Objects

Note that the some redundant slots have now been removed from the Stock and Fleet objects in OMtool (e.g., M2, Mgrad, Amplitude, Period, SelYears, etc). The Excel files received from CDFW have been slightly modified to account for these changes, and will be distributed with this document.

 # directory where the OM Excel files are located
OMdir <- 'G:/My Drive/1_PROJECTS/CDFW_Multi_Fleet/RockCrabDLM'

# Import the Female and Male Red Crab Stocks
RedF_Stock <- XL2Stock(file.path(OMdir, 'OMRedF.xlsx'), msg=FALSE)
RedM_Stock <- XL2Stock(file.path(OMdir, 'OMRedM.xlsx'), msg=FALSE)

# a list of stock objects (female stock in first position)
Stocks <- list(RedF_Stock, RedM_Stock) 

### 2.1.2 Import Fleet and create Fleet Object

A single fleet is imported:

Red_Fleet <- XL2Fleet(file.path(OMdir, 'OMRedF.xlsx'), msg=FALSE)

And a Fleets list is created, where the Red_Fleet is applied to both the female and male stocks:

Fleets <- list(
list(Red_Fleet), # female stock
list(Red_Fleet) # male stock
)

### 2.1.3 Set up 2-sex model

For a 2-sex model it is necessary to set up the model so that recruitment is determined by the spawning stock biomass of the female population. This is done using an argument to the multi-OM object (MOM) called SexPars:

SexPars <- list()
# Stock (Row) spawn from SSB contributed by Stock (Column)
SexPars$SSBfrom <- matrix(c(1,0, 1,0), byrow=TRUE,nrow=2) SexPars$SSBfrom
##      [,1] [,2]
## [1,]    1    0
## [2,]    1    0

SexPars$SSBfrom is a 2x2 matrix specifying recruitment to females (row 1) and males (row 2) comes from female spawning biomass (column 1). Note that it is important that the SexPars$SSBfrom matches the order of the stocks in Stocks (ie., female in first position in list Stocks, and first column in SexPars$SSBfrom. ### 2.1.4 Create MOM Object The multi-stock operating model is an object of class MOM. Similar to the OM object, it requires a list of Stock, Fleet, Observation (Obs), and Implementation (Imp) objects, as well as the number of simulations to run. For simplicity, we will use the generic observation object: ObsList <- list( list(Generic_Obs), # Obs for female list(Generic_Obs) # Obs for male (the same) ) And no implementation error: ImpList <- list( list(Perfect_Imp), list(Perfect_Imp) ) As this is for demonstration and testing purposes, the number of simulations is set quite low so that it runs quickly: nsim <- 10 By default, the operating model calculates depletion in terms of spawning biomass relative to the equilibrium unfished spawning biomass $$(\text{SB}_0)$$. To calculate depletion in terms of vulnerable biomass, use the custom parameters argument: cpars <- list() # skip this line to calculate depletion in terms of SSB cpars$control\$D <-'VB'

The MOM object is created using the new function:

MOM <- new("MOM",
Stocks = Stocks,
Fleets = Fleets,
Obs = ObsList,
Imps = ImpList,
CatchFrac = NULL,
SexPars=SexPars,
cpars=cpars,
nsim = nsim,
interval=1)

## 2.2 Run the Historical Simulations

The simulations for the historical and projection period can be run separately in OMtool. This is important as running the historical simulations can be quite time-consuming in some cases where the model has to optimize for depletion for a large number of stocks and fleets.

### 2.2.1 Simulate Historical Fishery

The simulation of the historical fishery is done with the SimulateMOM function (here we are using parallel processing; set parallel to FALSE if there are any problems with using parallel processing on your machine):

RCrabHist <- SimulateMOM(MOM, parallel = TRUE)

To avoid re-running the historical simulations each time, they can be saved to disk:

saveRDS(RCrabHist, file.path(OMdir, 'RCrabHist.rda'))

## 2.3 Define Management Procedures

The management options that have been proposed by CDFW for the rock crab fishery are static size limits, male only fishery (release of all female crabs), and effort reductions.

Permits for the crab fishery are limited, but there is currently latent effort in the fishery, so effort could increase. Modeling the changes in fishing effort in the future projections requires either a bio-economic model that describes how effort changes in response to catch rates, or simplifying assumptions for the fishing effort in the future years.

The latter approach is used in this case study. Two scenarios are included for future fishing effort:

1. Effort remains at the current level

2. Effort increases over the next 5 years to twice the current level

These scenarios are included as examples only, and without further discussion with CDFW and fishery stakeholders, they should not be considered credible scenarios for future effort.

### 2.3.1 Current Size Limit

The curE MP assumes that the current size limit of 4.25 inch (108 mm) remains the same and fishing effort remains at the current level.

A MP is defined that increases effort over the first 5 years of the projection period to twice the current level (current size limit remains unchanged):

incE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object
curYr <- max(Data@Year) - Data@LHYear # current year
if (curYr <=5) {
eff_inc <- 1 + 0.2 * curYr # effort increases 20% per year for first 5 years
} else {
eff_inc <- 2 # 100% increase after 5 years
}
rec@Effort <- eff_inc # populate Effort slot
rec
}
class(incE) <- 'MP' # assign to class MP

### 2.3.2 Male Only Fishery & Current Size Limit

In a male only fishery, there is no retention of female catch. The MP does this by setting the retention curve to 0 for the female stock. Note that under this assumption, the female catch still suffers the discard mortality (if any) from crabs that are selected but not retained. To modify this assumption, the MP should change the selectivity curve instead of the retention curve.

Two MPs are defined, one with effort remaining at current levels, and the other with an increase in effort:

MOnly_curE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object
# set length-at-5% retention to maximum size class (ie nothing is retained)
rec@LR5 <- max(Data@CAL_bins)
rec@LFR <- rec@LR5 + 1
rec@Effort <- 1
rec
}
class(MOnly_curE) <- 'MP'

MOnly_incE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object
# set length-at-5% retention to maximum size class (ie nothing is retained)
rec@LR5 <- max(Data@CAL_bins)
rec@LFR <- rec@LR5 + 1

curYr <- max(Data@Year) - Data@LHYear # current year
if (curYr <=5) {
eff_inc <- 1 + 0.2 * curYr # effort increases 20% per year for first 5 years
} else {
eff_inc <- 2 # 100% increase after 5 years
}
rec@Effort <- eff_inc # populate Effort slot
rec
}
class(MOnly_incE) <- 'MP'

### 2.3.3 Increased Size Limit

CDFW proposed evaluating the impact of an increased size limit for red crab - increasing from 108 mm to 140 mm.

As the stocks are independent, this MP can be applied separately to the Brown and Yellow crab stocks to evaluate the impact a 140 mm size limit would have on these stocks.

Again, two MPs are defined:

newSL_curE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object
# set retention to ~138
rec@LR5 <- 138
rec@LFR <- 140

rec@Effort <- 1 # populate Effort slot
rec
}
class(newSL_curE) <- 'MP'

newSL_incE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object
# set retention to ~138
rec@LR5 <- 138
rec@LFR <- 140

curYr <- max(Data@Year) - Data@LHYear # current year
if (curYr <=5) {
eff_inc <- 1 + 0.2 * curYr # effort increases 20% per year for first 5 years
} else {
eff_inc <- 2 # 100% increase after 5 years
}
rec@Effort <- eff_inc # populate Effort slot
rec
}
class(newSL_incE) <- 'MP'

### 2.3.4 Effort Limit

The final MP examines the impact of a reduction in fishing effort. The MP has been defined to reduced fishing effort in the future years by an arbitrary 25% from the current level.

Similar to the previous MPs, as the stocks are independent this MP can be applied separately to the Brown and Yellow crab stocks to evaluate the impact of reduced fishing effort on these stocks.

reduceE <- function(x, Data, ...) {
rec <- new('Rec') # create recommendation object

rec@Effort <- 0.75 # populate Effort slot
rec
}
class(reduceE) <- 'MP'

## 2.4 Run Forward Projections

The forward projections are done with the ProjectMOM function. This function requires the historical simulations returned by SimulateMOM (class multiHist) and a list of management procedures.

Some of the MPs are stock-specific (ie. MOnly_curE and MOnly_incE) so the MPs must be specified as a stock-specific list:

MPlist <- list(
# MPs for female stock
c('curE', 'incE', 'newSL_curE', 'newSL_incE', 'MOnly_curE', 'MOnly_incE', 'reduceE'),
# MPs for male stock
c('curE','incE', 'newSL_curE', 'newSL_incE', 'curE', 'incE', 'reduceE')
)

Notice that the curE and incE MPs are repeated for the male stock in the same position that the female stock has the no-retention MPs.

# load the saved historical simulations
RedCrab_MSE <- ProjectMOM(RCrabHist, MPs=MPlist)
saveRDS(RedCrab_MSE, file.path(OMdir, 'RedCrab_MSE.rda'))

## 2.5 Examine Results

The ProjectMOM function returns an object of class MMSE, which contains all of the information from the MSE run. This object is similar to the MSE object (which has been slightly modified in the new version of MSEtool), with the key difference that slots B_BMSY, F_FMSY, etc now have dimensions for the multiple stocks and/or fleets.

The MMSE object may continue to be revised over time. The current slots in the object are:

slotNames('MMSE')
##  [1] "Name"     "nyears"   "proyears" "nMPs"     "MPs"      "MPcond"
##  [7] "MPrefs"   "nsim"     "nstocks"  "nfleets"  "Snames"   "Fnames"
## [13] "Stocks"   "Fleets"   "Obss"     "Imps"     "OM"       "Obs"
## [19] "B_BMSY"   "F_FMSY"   "B"        "SSB"      "VB"       "FM"
## [25] "C"        "TAC"      "SSB_hist" "CB_hist"  "FM_hist"  "Effort"
## [31] "PAA"      "CAA"      "CAL"      "CALbins"  "MSY_P"    "FMSY_P"
## [37] "SSBMSY_P" "Misc"

The MMSE object contains a lot of information and the results can be visualized in many different ways.

Currently, the main way to plot the results for the MMSE object is to use the generic plot function. This creates a series of projection plots, showing a) Spawning biomass $$(\text{SB})$$ relative to $$\text{SB}_\text{MSY}$$ for each stock and each MP, b) fishing mortality $$(F)$$ relative to $$F_\text{MSY}$$ for each stock and MP, c) total yield relative to the first projection year for each stock and MP, and d) average yield (absolute) for each stock and fleet (and MP).

plot(RedCrab_MSE, maxcol=7, curyr=2018)