
Changelog
DLMtool 7.0.0
- part of the
openMSE 2.0release; requiresMSEtool (>= 4.0.0) - removed MP
SPMSYas it clashes withMSEtoolfunctions
DLMtool 6.0.7
CRAN release: 2026-02-05
- patch to fix issues with NEWS.md
- removed
LBSPRMP due to issues with compiling the C+ code
DLMtool 6.0.2
CRAN release: 2021-07-03
Fixes
- Fixed issue with
LtargetEMP where it was incorrectly averaging across simulations (thanks to Ernesto Carrella for spotting this)
DLMtool 6.0.0
CRAN release: 2021-01-13
V6.0.0 is a major update to the DLMtool package. It is not backwards compatible with previous versions of DLMtool or MSEtool.
Major Changes
- The code in the
DLMtoolpackage is now limited to the collection of the data-limited management procedures. - All operating model simulation and projection functions have now been moved to the new version of
MSEtool(v3+). -
MSEtoolv3+ is a dependency forDLMtoolv6+, and all operating model simulation and projection functions are available after installing and loadingDLMtool.
DLMtool 5.4.5
CRAN release: 2020-06-16
DLMtool 5.4.4
CRAN release: 2020-06-02
New Additions
- Management procedures can now update the discard rate (
Rec@DR) - Catchability parameter (q) can now be passed in with cpars (
OM@cpars$qs). Doesn’t optimize for depletion and updatesOM@D. - Units for the additional indices (
Data@AddInd) can now be specified usingData@AddIunits(numeric vector length n.ind 1=biomass (default) 0=numbers). - Additional indices can now use total, spawning, or vulnerable biomass using
Data@AddIndType(numeric vector length n.ind 1=total stock (default), 2=spawning stock, 3=vulnerable stock).
Fixes
- fix issue where
Misc$Removalswasn’t being returned in parallel mode. - fix issue with
XL2OMfor latest version of R (behavior ofbase::data.matrixchanged) - minor fixes for R V4.0
- fix to calculation of retained and total catch - thanks to K. Sys for picking this up.
DLMtool 5.4.3
CRAN release: 2020-04-16
Minor changes
- Added spatial sampling for some data. Set the fraction of sampling within each area as a named list in
OM@cpars$control$Sample_Area; e.g.,OM@cpars$control$Sample_Area$CatchThe following names are accepted:-
Catch(includes average catch); -
BIndtotal biomass index -
SBIndspawning biomass index -
VIndvulnerable biomass index -
RecIndrecruitment index -
CAA- catch-at-age -
CAL- catch-at-length (also applies to mean length, length-at-first capture, etc) Each must be an array with dimensionsc(nsim, nyears+proyears, nareas).
-
Fixes
- fix bug when optimizing for vulnerable depletion in parallel mode
- fix issue where latest version of
DTpackage brokePMObjandPMLimittables - fix catch bias for projections when conditioning on real data
- fix retention-at-age when retention-at-length passed in
OM@cpars - fix bug in
LBSPR_MLLMP - correction for auto-correlation in index when real data is used to condition model.
DLMtool 5.4.2
CRAN release: 2020-03-10
Minor changes
-
validcparsnow returns a HTML data table with information on parameters that can be passed inOM@cpars - add new slots to Data object:
Data@VIndandData@SpIndfor relative vulnerable and spawning abundance respectively. Also add CV slots for each. Note that these use the same observation error and betas asData@Ind(total abundance) and all built-in MPs useData@Ind. -
Subfunction now subsets Data in MSE object by MP. -
Convergenow returns a summary table of convergence diagnostics (thanks to Sarah Valencia) - add total removals (catch plus discards) to
MSE@Misc$Removals - units of
Data@AddIndcan now be specified withcpars$AddIUnits: numeric vector of lengthn.indwith 1 specifying biomass (default) and 0 abundance by numbers. - moved all non-essential packages to
Suggests - removed deprecated function
ForceCor, useLH2OMinstead
Fixes
- fix bug where CAL_bins wasn’t calculated when only CAL_mids was provided in Data
- fix issue when all values for maturity-at-age (provided in cpars;
cpars$Mat_age) are greater than 0.5. Assume A50 is 1 in this case. - fix issue in parallel mode when cpars only is
cpars$Data - fix issue in SubOM when OM is empty
- correction for auto-correlated variability in recruitment per http://dx.doi.org/10.1139/cjfas-2016-0167
- fix warning message when creating PMLimit and PMobject tables
- fix error passing
CAL_binsorbinWidthin cpars
DLMtool 5.4.1
CRAN release: 2019-12-06
DLMtool 5.4.0
CRAN release: 2019-09-24
Minor changes
- The
Dataobject has been updated, main new features are the addition of an Effort slot (Data@EffortandData@CV_Effort) and all CV by year for all time-series information. - the
Data@RIndslot has been removed and replaced withData@AddInd - Additional information on the Data object can be found here.
Fixes
- fix bug where TAE implementation error was affecting TAC controls (thanks to Robyn Forrest and Sean Anderson for finding this)
- fix bug in
Cplot(thanks Sarah Valencia for picking this up) - fix bug with
runMSE(Hist=TRUE)where under some conditions theHistobject could not be stitched back together. - add informative error message when MPs are dropped because they crash
New Additions
- Added average annual variability in effort (
AAVE) performance objective method - Added MP type as column in
PMObjfunction - Add a constant current catch MP -
CurC - new
Domfunction (and removed oldDOMfunction) - add option to include a plus-group (e.g., OMs from
SS2OM). To use a plus-group, useOM@cpars$plusgroup = 1
DLMtool 5.3.1
CRAN release: 2019-04-29
DLMtool 5.3
CRAN release: 2019-03-06
New Features
- The
runMSEfunction is now more robust. MPs that fail (i.e. crash R) are now skipped without stopping the entire MSE. A warning message alerts users which MPs have been dropped from the analysis. -
runMSE(Hist=TRUE)returns a new S4 object of class ‘Hist’. This change means that information from historical simulations is now accessed using@instead of$. For example:Hist <- runMSE(Hist=TRUE)TS <- Hist@TSdata # time-series dataData <- Hist@Data # Data object from end of historical period -
runMSE(Hist=TRUE)now works with parallel processing - The cheat sheets have been updated. They can be accessed from within the R console using
cheatsheets - It is now possible to specify time-varying movement between areas using
OM@cpars$mov. -
Usesfunction has been added to return MPs that use a particular data slot. For example:Uses('AvC) - Depletion for the initial year of the simulations can now be specified using
OM@cpars$initD. - Real indices of abundance can be added to the Data object and used to condition OM.
- The calculations for unfished and MSY reference points have been standardized and are now fully described in the userguide
- New functions
PMLimitandPMObjhave been added to generate interacive HTML tables showing the performance of MPs (using objects of classPM) - An argument
Labelshas been added to theTradePlotfunction and related functions (Tplotetc). This allows users to replace the default MP name with something more user-friendly. For example:TradePlot(MSE, Labels=list(AvC="Average Catch")). An argumentcolshas also been added so users have full control on the colors of the points and labels. The MP labels can be removed completely by setting thelab.sizeargument toNULL
Major changes
- The slots for specifying gradients in life-history parameters (e.g
Stock@Mgrad,Stock@Linfgrad) have been removed. Time-varying parameters should now be specified withOM@cpars. - Biological reference points (SSB0, BMSY, FMSY, etc) are now calculated using a running average of the life-history and selectivity parameters over a period equal to the age of maturity for each simulation. See the userguide for more information.
- The
AnnualMSYargument is now deprecated. MSY reference points are now always calculated in every time-step. - The
runMSErobustfunction has been now removed from package (it was broken in the previous version).
Fixes
- fix issue with importing
Dataobjects with larger number of length bins - fix issue where length-at-age was negative with high t0
- allow custom area size for nareas > 2 in cpars
- fix issue with
curE75which was ratcheting down effort - fix issue with effort calculation when both effort control and TAC are implemented
- fix random seed in
Turingfunction - speed up plots in
Turingfunction - speed up plots in
summary(Data) - fix bug in CAL_nsamp and CAL_ESS when importing Obs object from CSV
- fix typo in documentation for Itarget MPs
DLMtool 5.2.3
CRAN release: 2018-09-11
New features
- A two-page cheat-sheet has been developed for main DLMtool functions. Access the online version with
cheatsheets() - New function to provide bootstrapped samples of von Bertalanffy growth parameters directly to cpars (
Growth2OM) - New function to estimate length-weight parameters from data (
LW2OM).
DLMtool 5.2
CRAN release: 2018-07-10
New Features
- option for variable management interval by MP in
runMSE.OM@intervalcan now be a vector of lengthnMPs, to specify different management intervals for different MPs. For example, withOM@interval=c(1,5)andrunMSE(OM, MPs=c('AvC', 'BK')),AvCis applied every year andBKis applied every 5 years.OM@interval` is recycled if not the same length as number of MPs.
New Functions
-
makeMeanMPhas been added to generate a MP that averages output from a list of other MPs. -
Turinghas been added to compare simulated data from an OM to the real data in the fishery Data object. -
LH2OMandpredictLHhave been added to predict correlated life-history parameters from FishBase using FishLife model.
Updated Functions
- improved convergence diagnostic with updated
Convergefunction -
Replacefunction has been updated to replace directly from individual Stock, Fleet, Obs, and Imp objects instead of from only OM objects - The plots produced by
summary(Data)function have been improved -
makePerfhas been replaced withtinyErrfunction with options to remove process error, observation error, and gradients - additional MPs have been added: effort-based LBSPR and variants of existing MPAs
-
PM(Performance Metric) methods have been updated and described in the user guide - MSE trade-off functions have been updated:
Trade_Plot,Tplot,Tplot2, andTplot3 -
Feasehas been simplified and updated. Fease object has now been removed
Improved Documentation
- similar functions and MPs have been combined into single help files
- all MPs now have an argument
plotand examples in the online documentation - documentation for MPs has been improved, including equations for calculations of TAC, TAE and size-limits
- custom parameters (
OM@cpars) have been updated and now have better documentation - the user guide
userguide()has been updated and additional chapters added on new features
Minor Fixes and Edits
- modified catch-at-length generation code to deal with dome-shaped selectivity better
- fixed issue where OMs were not reproducible if some slots had no variability
- new slots have been added to the
Dataobject:Common_Name,Species,Region, and for data-rich MPs in MSEtool:sigmaR(recruitment error) - iSCAM and SS2DLM functions have been moved from DLMtool to MSEtool
- added LHdatabase from FishLife and functions to predict life-history parameters
DLMtool 5.1.3
CRAN release: 2018-03-26
- fix Replace function for new OM slots
- fix indexing issue for size comps when there are only two size classes
- fix indexing issue for spawning biomass & MSY calcs for Ricker SRR in V5.1
- automatically call
setup()ifrunsMSE(parallel=TRUE)and cluster hasn’t been initialized - automatically export custom MPs to cluster if
runsMSE(parallel=TRUE) - fix index issue in
SPmod
DLMtool 5.1
CRAN release: 2018-03-18
Operating Model
Mixed MPs: it is now possible to design MPs that combine Output and Input controls. Previously, MPs in DLMtool where either class ‘Input’ or class ‘Output’. This has changed, and all MPs are now class ‘MP’ and return a standard recommendation object (‘Rec’) that allows specification of any combination of catch limit, effort limit, spatial closure, and size-at-selection and/or size-at-retention regulations.
MP types: For convenience, MPs can be categorised into 4 types: ‘Output’ (only catch limits), ‘Input’ (only spatial, effort, and/or size regulations), ‘Mixed’ (some combination of Output and Input regulations), and ‘Reference’ (MPs such as FMSYref or NFref which are designed to be used a references and not for actual applications). The function
MPtypecan be used to determine an MP’s type, e.gMPtype('AvC').Increased flexibility of selectivity, retention, and discard mortality controls: MPs can now modify both selectivity and retention curves, and also modify the level of discard mortality.
Historical MPAs: A new slot
MPAhas been added to theFleetobject. This allows users to specify the historical year and the fraction of an area that was closed. See?plotMPAfor an example.Improvements to MSY reference point calculations: MSY reference points are now calculate for every year. This accounts for changes in productivity (e.g., increases in growth) that affect reference points such as BMSY and FMSY.
Increased number of areas: By default DLMtool is a 2-area model. The code has now been updated to include more areas if required.
Movement by age: It is now possible to specify movement by age, such as ontogenetic migration offshore
Parallel processing:
runMSEhas been optimized for parallel processing. By default, parallel processing is not used ifnsim<=48. We suggest testing your OM with a low number of simulations (e.gnsim=48) and then increasing the number of simulations and using parallel processing:runMSE(OM, MPs, parallel=TRUE). Update messages are not displayed in parallel mode.Taxonomic information: New slots have been added to the
Stockobject to record common name and taxonomic details.
MP Performance
The
Convergefunction has been updated with a improved of convergence diagnostics.A new performance metric (
PM) class has been added. This allows users to develop a custom set of performance metrics for their management system. A series of examplePMobjects have been created (seeavail('PM')). Over time the summary and plotting functions will be updated to take a set ofPMobjects. SeeTplot3for an example.
Robustness and Testing
Many improvements to functions (e.g MPs) to improve robustness and avoid model crashes due to stochastic sampling of parameters.
All code in DLMtool is now tested using the
testthatpackage to ensure that the functions work as expected. Please continue to file bug reports at: https://github.com/DLMtool/DLMtool/issues
Documentation
The User Manual has been completely revised and updated. Use
userguide()to access. Please submit any typo corrections or suggestions for improvement at https://github.com/DLMtool/DLMtool_UserGuide/issues. Pull requests are welcome.We are developing an online library of DLMtool OMs (http://www.datalimitedtoolkit.org/fishery_library) which has the OM Report, OM Excel file, and OM R data object for each DLMtool OM. A standardized MSE report is in development. The OM library will be expanded as new OMs are developed. Please contact us if you have developed OMs and are able to make them publicly available.
A DLMtool user forum is in development and will be launched soon. The idea of the forum is to provide a platform for DLMtool users to ask questions and share experience with each other and the DLMtool team.
DLMtool 5.0
CRAN release: 2017-10-24
The following slots have been added to the OM object:
OM@intervalOM@pstarOM@maxFOM@reps
This was done so that an OM object is completely self-contained and includes all information used in the MSE.
DLMtool v4.4
CRAN release: 2017-07-20
Changes
- can now specify different retention and vulnerability at size curves to evaluate impact of discarding for sub-legal fish
- can now include general discarding across all size/age classes
- The structure of Input control MPs has been simplified. See the userguide for more details.
- The userguide can now be directly accessed from the console with: userguide()
- Additional operating models and other objects can be loaded from the DLMdata package, use: GetMoreData()
- Age or size-specific M has been updated (was in previous version) with plotting functions to visualize M-at-age
- All MPs have been thoroughly tested and modified to improve robustness and avoid crashing the model
- plotting functions have been improved
- SRA has been converted to RCpp for significant speed gain
DLMtool v4.1
CRAN release: 2017-05-02
Major Changes
-
Objects names have been shortened and modified for consistency:
- Observation has been renamed to Obs
- DLM_fease has been renamed to Fease
- DLM_output has been renamed Output
- DLM_input has been renamed Input
- DLM_data has been renamed Data
Implementation error and a dedicated implementation error object called ‘Imp’, (like Stock, Fleet and Obs) that can account for variability and overages/underages in both effort, catch and size limit advice (discarding rate and post release mortality rate are coming soon)
At least 10 new example operating models from real DLMtool applications in the US and Canada
Stochastic SRA operating model functions (i.e. build a full operating model accounting for correlations in parameters using historical catch trends and some composition data)
Full plots of operating model conditions
Stock-synthesis assessment to DLM function for specifying operating models (currently MLE only but adding MCMC and hessian options)
iSCAM assessment to DLM support for specifying operating models (MPD only but adding MCMC and hessian options soon)
Tracking of historical versus current simulated age composition in catches and population over simulations
New function ‘Replace’ for copying parts of an operating model to another operating model (e.g. Robin Hood approach,where you may want to borrow say, the fleet characteristics from another operating model)
Estimation of a new reference point ‘Blow’ for calculation of conservation-related performance metrics (Blow is the spawning biomass where it takes HZN number of mean generation times to reach Bfrac fraction of SSBMSY given zero catches, where the user can specify HZN and Bfrac).
Canadian DFO performance plots (DFO_hist, DFO_proj, DFO_plot2)
Biomass recovery relative to Blow plots (COSEWIC_plot)
A dedicated custom parameters slot in the operating model object. This is a list where the user can place custom parameters samples (from any distribution / correlation structure you wish) that are named as they appear in the operating model.
DLMtool V3.2.3
CRAN release: 2017-04-10
Major Changes
- all objects previously in
DLMdathave now been added as separate data objects. This means that it is no longer necessary to unpack data objects at the beginning of an R session. - parallel processing can be initialized with a new function
setup() -
runMSEandrunMSErobustfunctions have a new logical argumentHist. WhenHist=TRUEthe model returns the historical simulations only. -
CheckConverghas been deprecated - useConvergenow to check MSE for convergence - several optimization functions in the historical simulations have been re-coded in C++ using the Rcpp package (about 10x faster)
Minor Changes
- package now uses Roxygen2 for all documentation.
- exported several previously internal functions that make it easier for users to examine code
- removed LBSPR functions and replaced with dependency on LBSPR package
- moved
customparssection inrunMSE.rand renamed parameters to match OM object - modified MSE code so that
R0can be a vectornsimlong -
customparshas been moved in the MSE code so that more parameters can be passed in to the MSE. A message alerts users which valid parameters have been found incustomparsand any invalid parameters are displayed in a warning message - changed variable name
BMSY_B0toSSBMSY_SSB0to avoid confusion - added projected spawning stock biomass
SSBand vulnerable biomassVBto MSE object - added
SpAbunslot to data object for abundance of spawning stock. TheAbunslot relates to vulnerable biomass - added
ntrialsandfracDcontrol arguments torunMSE. Allows user to modify the maximum number of re-samples in the optimization to achieve the sampled depletion. The model will stop if a proportion greater thanfracDof the simulated depletion values are not the same as the sampled values after more thanntrialsre-samples
Bug Fixes
- fixed typo in
getrfunction - fixed indexing error in Ricker SRR fixed
- fixed bug in catch-at-length and catch-at-age generation code where years were being indexed incorrectly
- fixed bug in
ChooseEffortfunction where nyears was being set to 0 in some cases - fixed bug in calculation of Lbar
- fixed colors in
Pplot2for F/FMSY - fixed calculation of bias in steepness when
hcvis 0 in the runMSE code - LFC and LFS in future projections weren’t being updated correctly
- fixed F calculations at end of MSE so that
FMSYrefresults in exactly F/FSMY = 1 -
maxFnow also applies to the catch that is taken from the population