List of 29
$ tottime : 'difftime' num 2.94
$ runtime : POSIXct[1:1], format: "2025-01-07 07:54:54"
$ starttime : POSIXct[1:1], format: "2025-01-07 07:51:58"
$ glb :List of 19
$ ctrl :List of 13
$ zoneCP :List of 56
$ zoneD :List of 14
$ zoneDD :List of 14
$ zoneDP :List of 14
$ NAS : NULL
$ projC :List of 5
$ condC :List of 15
$ sauout :List of 10
$ outzone :List of 13
$ production : num [1:71, 1:6, 1:56] 256 244 233 223 213 ...
$ condout :List of 2
$ HSstats :List of 2
$ saudat : num [1:32, 1:8] 21.5 0.3 130 1 54.3 ...
$ constants : num [1:33, 1:56] 6 21.5 0.3 130 1 ...
$ hsargs :List of 16
$ sauprod : num [1:7, 1:8] 438.882 149.874 20.272 0.341 140.632 ...
$ zonesummary :List of 2
$ kobedata : num [1:8, 1:4] 0.33 0.449 0.258 0.242 0.313 ...
$ outhcr :List of 8
$ scoremed : num [1:30, 1:7] 42.8 35.3 31.8 31.5 33.4 ...
$ popmedcatch :List of 8
$ popmedcpue :List of 8
$ popmeddepleB:List of 8
$ pops : num [1:56, 1:26] 1 2 3 4 5 6 7 8 9 10 ...
11 Appendix: MSE Output Object Structure
After running the do_MSE function with its output pointed at the R list/object named out, we can examine the contents of these objects using the base R function str(object, max.level=1)
. That can sometimes lead to more information than is immediately useful so it is often easier to use a codeutils wrapper function str1(out)
or str2(out)
, which now omit the attributes (see their respective help pages).
It will be noted that using str2
expands lists within lists, however, it will also be noted that some of the objects have lists within lists within lists. Obviously the structure of any of these objects can be examined by drilling further down, as for example one could use str1(out$zoneCP[[1]])
to see the structure of each of the 56 population’s constants definition object (as used in the projections; look at zoneC to see what was used during the conditioning).
The main simulated results from the MSE are contained in a large object named out, which is a list of 28 other objects, many of which are lists themselves.
11.1 Main Output R Objects from aMSE
The structure of each of the objects contained within out will be described with the objects used in the running of the MSE described first, followed by outputs from the conditioning, followed by outputs from the projections.
11.1.1 glb : List of 19
A globals object with its components used in many places
List of 19
$ numpop : num 56
$ nSAU : num 8
$ midpts : num [1:105] 2 4 6 8 10 12 14 16 ...
$ Nclass : num 105
$ reps : num 250
$ hyrs : num 58
$ pyrs : num 30
$ hyrnames : num [1:58] 1963 1964 1965 1966 ...
$ pyrnames : int [1:30] 2021 2022 2023 2024 2025 2026 2027 2028 ...
$ saunames : chr [1:8] "sau6" "sau7" "sau8" ...
$ SAUpop : num [1:8] 3 3 5 7 9 9 12 8
$ larvdisp : num 0.01
$ indexCE : int 30
$ envimpact: NULL
$ warnfile : chr "c:/Users/malco/DropBox/A_codeR/aMSEGuide/runs/EG/warnings.txt"
$ sauLML : num 0
$ sauindex : num [1:56] 1 1 1 2 2 2 3 3 ...
$ move : num [1:56, 1:56] 0.995 0.005 0 0 0 0 0 0 ...
$ SAUnum : num [1:56] 6 6 6 7 7 7 8 8 ...
11.1.2 ctrl : List of 13
Variables used when controlling the MSE run.
List of 13
$ runlabel : chr "Base_Case"
$ datafile : chr "saudataEG.csv"
$ controlfile: chr "controlEG.csv"
$ reps : num 250
$ randseed : num 3543304
$ randseedP : num 0
$ withsigR : num 0.35
$ withsigB : num 0.1
$ withsigCE : num 0.1
$ catches : num 58
$ projection : num 30
$ bysau : num 1
$ rundir : chr "c:/Users/malco/DropBox/A_codeR/aMSEGuide/runs/EG"
11.1.3 projC : List of 5
Other constants used during the projections. Note that projyrs = glb$pyrs, which is now used more often in the code-base and eventually it will be deprecated in projC.
List of 5
$ projLML: num [1:30, 1:2] 145 145 145 145 145 ...
$ projyrs: num 30
$ Sel : num [1:105, 1:56, 1:30] 9.48e-35 2.84e-34 ...
$ SelWt : num [1:105, 1:56, 1:30] 5.41e-38 1.44e-36 ...
$ histCE : num [1:29, 1:8] NA NA NA NA NA ...
The NA in the histCE vector reflects the fact that in SAU6 (the 8 SAU are across the columns), like SAU13, has no CPUE data until 2000.
11.1.4 condC : List of 7
More constants used during conditioning; compdat holds the observed size-composition data from each sau in lfs, as well as their relative proportions in palfs.
List of 15
$ histCatch : num [1:58, 1:8] 0 1 2 8 22 31 24 29 39 33 ...
$ histyr : num [1:58, 1:2] 1963 1964 1965 1966 1967 ...
$ histCE : num [1:29, 1:8] NA NA NA NA NA ...
$ yearCE : num [1:29] 1992 1993 1994 1995 1996 ...
$ initdepl : num [1:8] 1 1 1 1 1 1 1 1
$ compdat :List of 2
..$ lfs : num [1:38, 1:31, 1:8] 0 0 0 0 0 0 0 0 0 0 ...
..$ palfs: num [1:31, 1:8] 0 0 0 0 0 0 0 0 0 0 ...
$ recdevs : num [1:58, 1:8] -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ...
$ parsin : logi FALSE
$ optpars : NULL
$ sizecomp : num 1
$ lffiles : chr "lf_WZ90-20.csv"
$ poprec : num [1:56, 1:3] 6 6 6 7 7 7 8 8 8 8 ...
$ yearFIS : NULL
$ fisindexdata: NULL
$ fissettings : NULL
11.1.5 condout : List of 2
sauZone contains the conditioning dynamics across hyrs years summed across populations to the sau scale for each of the dynamic variables. This ignores replicates, as found in zonePsau, and is there more for convenience than needed. ssq is for each sau and reflects the difference between the observed cpue and the predicted.
List of 2
$ sauZone:List of 9
..$ matB : num [1:58, 1:9] 439 438 436 429 409 ...
..$ expB : num [1:58, 1:9] 415 414 413 409 395 ...
..$ midyexpB: num [1:58, 1:9] 0 431 430 428 421 ...
..$ catch : num [1:58, 1:9] 0 1 2 8 22 ...
..$ recruit : num [1:58, 1:9] 259139 259078 258961 258478 257088 ...
..$ harvestR: num [1:58, 1:9] NaN 0.00232 0.00465 0.0187 0.05228 ...
..$ cpue : num [1:58, 1:9] NA 437 436 432 422 ...
..$ deplsB : num [1:58, 1:9] 1 0.998 0.994 0.977 0.933 ...
..$ depleB : num [1:58, 1:9] 1 0.999 0.996 0.985 0.953 ...
$ ssq : num [1:8] 385 1801 10159 2444 777 ...
11.1.6 zoneDD : List of 13
The dynamics object generated during conditioning. Each of the dynamic’s matrices are 2-dimensional (years vs populations), the predicted size-composition matrices (catchN, Nt, and NumNe) are 3-dimensional (size-class vs year vs population).
List of 14
$ SAU : chr [1:56] "sau6" "sau6" "sau6" ...
$ matureB : num [1:58, 1:56] 311 311 309 304 ...
$ exploitB: num [1:58, 1:56] 293 293 292 289 ...
$ midyexpB: num [1:58, 1:56] 0 305 304 303 ...
$ catch : num [1:58, 1:56] 0 0.707 1.414 5.655 ...
$ harvestR: num [1:58, 1:56] 0 0.00232 0.00465 0.01869 ...
$ cpue : num [1:58, 1:56] 437 437 436 432 ...
$ recruit : num [1:58, 1:56] 191443 191398 191312 190957 ...
$ deplsB : num [1:58, 1:56] 1 0.998 0.994 0.978 ...
$ depleB : num [1:58, 1:56] 1 0.999 0.996 0.985 ...
$ catchN : num [1:105, 1:58, 1:56] 0 0 0 0 0 0 0 0 ...
$ Nt : num [1:105, 1:58, 1:56] 1.91e+05 7.45e-03 1.50e-01 2.18 ...
$ NumNe : num [1:105, 1:58, 1:56] 0 0 0 0 0 0 0 0 ...
$ outfis : NULL
11.1.7 zoneCP : List of 56
The constants for each projected population in a list of lists (see str1(out$zoneCP[[1]])).
- ..$ :List of 21 .. ..- attr(*, “class”)= chr “abpop”
- ..$ :List of 21 .. ..- attr(*, “class”)= chr “abpop”
- ..$ :List of 21 .. ..- attr(*, “class”)= chr “abpop”
- ..$ :List of 21 .. ..- attr(*, “class”)= chr “abpop”
- …
- ..- attr(*, “class”)= chr “zoneC”
Each abpop is a list of 21 objects.
List of 21
$ Me : num 0.154
$ R0 : num 192282
$ B0 : num 311
$ ExB0 : num 293
$ MSY : num 14.5
$ MSYDepl : num 0.342
$ bLML : num 132
$ scalece : Named num 1.41
$ qest : num 4.76
$ lambda : num 0.75
$ SaM : num 99.5
$ popdef : Named num [1:22] 21.6 130.4 ...
$ LML : Named num [1:58] 127 127 127 127 127 ...
$ G : 'STM' num [1:105, 1:105] 1.67e-09 4.54e-08 ...
$ Maturity: num [1:105] 3.02e-10 4.73e-10 ...
$ WtL : num [1:105] 0.000571 0.005075 ...
$ Emergent: num [1:105] 3.74e-15 6.43e-15 ...
$ Select : num [1:105, 1:88] 6.81e-45 3.49e-44 ...
$ SelWt : num [1:105, 1:88] 3.89e-48 1.77e-46 ...
$ MatWt : num [1:105] 1.72e-13 2.40e-12 ...
$ SAU : chr "sau6"
11.1.8 zoneDP : List of 14
The much larger dynamics object generated during the projections. Each of the dynamic’s matrices are 3-dimensional having years x populations x replicates. The first year in the model relates to the unfished state or the initial state, hence the zero for mid-year exploitable biomass (midyexpB), catch, acatch, etc.
List of 14
$ SAU : num [1:56] 6 6 6 7 7 7 8 8 ...
$ matureB : num [1:88, 1:56, 1:250] 311 311 309 304 ...
$ exploitB: num [1:88, 1:56, 1:250] 293 293 292 289 ...
$ midyexpB: num [1:88, 1:56, 1:250] 0 305 304 303 ...
$ catch : num [1:88, 1:56, 1:250] 0 0.707 1.414 5.655 ...
$ acatch : num [1:88, 1:8, 1:250] 0 1 2 8 ...
$ harvestR: num [1:88, 1:56, 1:250] 0 0.00232 0.00465 0.01869 ...
$ cpue : num [1:88, 1:56, 1:250] 437 437 436 432 ...
$ cesau : num [1:88, 1:8, 1:250] 0 437 436 432 ...
$ catsau : num [1:88, 1:8, 1:250] 0 1 2 8 ...
$ recruit : num [1:88, 1:56, 1:250] 191443 191398 191312 190957 ...
$ deplsB : num [1:88, 1:56, 1:250] 1 0.998 0.994 0.978 ...
$ depleB : num [1:88, 1:56, 1:250] 1 0.999 0.996 0.985 ...
$ TAC : num [1:88, 1:250] 0 20 86 290 ...
11.1.9 NAS : List of 2
The size composition objects following projection. Each array is a 4-dimensional object having size-class x year x population x replicates. Nt is the population structure while catchN is the expected size-composition of the catch by population.
- ..$ Nt : num [1:105, 1:88, 1:56, 1:100] 1.61e+05 1.97e-06 8.07e-05 …
- ..$ catchN: num [1:105, 1:88, 1:56, 1:100] 0 0 0 0 0 0 0 0 0 0 …
When saving the out object from a run of the do_MSE function, if the includeNAS argument is set = FALSE, then the NAS object will be set = NULL. This option exists because the NAS object, made up of multiple 4-D arrays can be very large. so the output can increase from a few 100s of Megabytes, or almost 2 Gigabytes.
11.1.10 sauout : a List
sauout is one of the major outputs from the MSE. It contains the dynamics for each sau in the zone. Including:
List of 10
$ matureB : num [1:88, 1:8, 1:250] 439 438 436 429 409 ...
$ exploitB: num [1:88, 1:8, 1:250] 415 414 413 409 395 ...
$ midyexpB: num [1:88, 1:8, 1:250] 0 431 430 428 421 ...
$ catch : num [1:88, 1:8, 1:250] 0 1 2 8 22 ...
$ acatch : num [1:88, 1:8, 1:250] 0 1 2 8 22 ...
$ harvestR: num [1:88, 1:8, 1:250] NaN 0.00232 0.00465 0.0187 0.05228 ...
$ cpue : num [1:88, 1:8, 1:250] 0 437 436 432 422 ...
$ recruit : num [1:88, 1:8, 1:250] 259139 259078 258961 258478 257088 ...
$ deplsB : num [1:88, 1:8, 1:250] 1 0.998 0.994 0.977 0.933 ...
$ depleB : num [1:88, 1:8, 1:250] 1 0.999 0.996 0.985 0.953 ...
If the includeNAS argument is set = TRUE, then sauout would be a list of 12 objects that would include:
- ..$ catchN : num [1:105, 1:88, 1:8, 1:100] 0 0 0 0 0 0 0 0 0 0 …
- ..$ Nt : num [1:105, 1:88, 1:8, 1:100] 2.59e+05 9.25e-03 1.90e-01 2.81
11.1.11 outzone : List of 12
outzone contains the projection dynamics across all years summed across populations and sau to give the zone scale changes for each of the dynamic variables, including catchN and Nt (being only 3-D arrays tends to reduce their size. outzone is another major output from the MSE.
List of 13
$ matureB : num [1:88, 1:250] 14541 14523 14445 14184 ...
$ exploitB: num [1:88, 1:250] 14587 14578 14530 14361 ...
$ midyexpB: num [1:88, 1:250] 0 15132 15113 15035 ...
$ catch : num [1:88, 1:250] 0 20 86 290 ...
$ acatch : num [1:88, 1:8, 1:250] 0 1 2 8 ...
$ TAC : num [1:88, 1:250] 0 20 86 290 ...
$ harvestR: num [1:88, 1:250] 0 0.00132 0.00569 0.01929 ...
$ cpue : num [1:88, 1:250] 0 405 399 395 ...
$ recruit : num [1:88, 1:250] 6705236 6704327 6700497 6687410 ...
$ deplsB : num [1:88, 1:250] 1 0.999 0.993 0.975 ...
$ depleB : num [1:88, 1:250] 1 0.999 0.996 0.984 ...
$ catchN : num [1:105, 1:88, 1:250] 0 0 0 0 0 0 0 0 ...
$ Nt : num [1:105, 1:88, 1:250] 6.71e+06 2.00e-02 4.34e-01 6.82 ...
11.1.12 outhcr
The objects contained in this are determined by a custom function written within each jurisdiction. Each harvest strategy is very different from every other jurisdiction’s harvest strategy, and each reaches its outcomes in different ways. The outhcr object is produced by a custom function which is pointed to by the do_MSE argument makeouthcr. This uses a valuable method in the R language where a function can have a different function as an argument so that different functions can be applied in different circumstances (such as jurisdictions having different harvest strategies). The listing below is for Tasmania but would be different for South Australia and different again for Victoria. Note in Tasmania’s case each object is a 3-D array of the projection years (30) x sau (8) X replicates (100; in real-life scenario testing one would use perhaps 250 replicates as 100 might not be sufficient to define the total variability expected).
List of 8
$ g1s : num [1:30, 1:8, 1:250] 3.62 9.22 9.17 6.66 ...
$ g4s : num [1:30, 1:8, 1:250] 6.08 6.49 9.17 9.31 ...
$ targsc : num [1:30, 1:8, 1:250] 2.43 3.93 5.83 6.68 ...
$ finalsc : num [1:30, 1:8, 1:250] 3.46 5.1 7 7.33 ...
$ index : num [1:30, 1:8, 1:250] 4 6 7 8 10 9 8 9 ...
$ catchmult: num [1:30, 1:8, 1:250] 0.85 1 1.05 1.1 1.2 1.15 1.1 1.15 ...
$ metaflag : num [1:30, 1:8, 1:250] 0 0 0 0 0 0 0 0 ...
$ cetarg : num [1:30, 1:8, 1:250] 122 122 122 122 ...
The projected final score (finalsc), in Tasmania, is that which is used to select which aspirational catch multiplier (hcr in hsargs), is used in an sau. These data are used to generate the plots seen in the scores tab in the aMSE output (as in finalscores_sauX.png files).
11.1.13 production 3D array
A 3d array of harvest rates x 6 dynamic variables x numpop, where the dynamic variables are ‘ExB’ exploitable biomass, ‘MatB’, mature biomass, ‘AnnH’, the annual harvest rate, ‘Catch’ the yield, the maximum of which is the MSY, ‘Deplet’, the equilibrium depletion that the harvest rate leads to, and ‘RelCE’, the relative cpue predicted at that equilibrium.
- num [1:81, 1:6, 1:56] 256 244 233 223 213 …
- attr(*, “dimnames”)=List of 3 ..$ : chr [1:81] “0” “0.005” “0.01” “0.015” … harvest rates ..$ : chr [1:6] “ExB” “MatB” “AnnH” “Catch” … dynamic variables ..$ : chr [1:56] “1” “2” “3” “4” … population number
11.1.14 condout : List of 2
Where sauZone is a list of 9 components 2-D matrices containing the conditioned state of each of 8 sau (in this case 58-year’s of historical catches) as well as the complete zone (for Tasmania) in the ninth column.
List of 2
$ sauZone:List of 9
..$ matB : num [1:58, 1:9] 439 438 436 429 409 ...
..$ expB : num [1:58, 1:9] 415 414 413 409 395 ...
..$ midyexpB: num [1:58, 1:9] 0 431 430 428 421 ...
..$ catch : num [1:58, 1:9] 0 1 2 8 22 ...
..$ recruit : num [1:58, 1:9] 259139 259078 258961 258478 257088 ...
..$ harvestR: num [1:58, 1:9] NaN 0.00232 0.00465 0.0187 0.05228 ...
..$ cpue : num [1:58, 1:9] NA 437 436 432 422 ...
..$ deplsB : num [1:58, 1:9] 1 0.998 0.994 0.977 0.933 ...
..$ depleB : num [1:58, 1:9] 1 0.999 0.996 0.985 0.953 ...
$ ssq : num [1:8] 385 1801 10159 2444 777 ...
11.1.15 HSstats : List of 2
Two HS performance measures, the sum of catches across the first 5 and first 10 years of the projections. In this case, this is for each of SAU used separately, and for the combined zone total.
List of 2
$ sum10: num [1:250, 1:9] 93.1 84 77.4 79.2 92.4 ...
$ sum5 : num [1:250, 1:9] 33.7 30.9 28.1 28 34.7 ...
11.1.16 saudat : is an array of constants
This is a copy of the input constants read in from saudata_Scenario.csv in case comparisons are wanted.
num [1:32, 1:8] 21.5 0.3 130 1 54.3 ...
11.1.17 constants : an array of constants
The actual biological and fishery constants used to define each population.
num [1:33, 1:56] 6 21.5 0.3 130 1 ...
11.1.18 hsargs a copy of the hsargs
This is a copy of the hsargs used in the example scenario and will depend upon the HS used. For Tasmania it is a List of 16:
List of 16
$ mult : num 0.1
$ wid : num 4
$ targqnt : num 0.55
$ maxtarg : num [1:8] 150 150 150 150 150 150 150 150
$ pmwts : num [1:3] 0.65 0.25 0.1
$ hcr : num [1:10] 0.25 0.75 0.8 0.85 0.9 1 1.05 1.1 1.15 1.2
$ hcrm3 : num [1:10] 0.25 0.75 0.8 0.85 0.9 1 1.1 1.2 1.25 1.3
$ startCE : num 2000
$ endCE : num 2019
$ metRunder : num 0
$ metRover : num 0
$ decrement : num 1
$ pmwtSwitch: num 0
$ stablewts : num [1:3] 0.8 0.15 0.05
$ hcrname : chr "constantrefhcr"
$ printmat : NULL
11.1.19 sauprod : a 7 x nsau matrix
A matrix of productivity characteristics for each sau. These include the \(B0\), \(B_{MSY}\), \(MSY\), \(D_{MSY}\) (depletion at \(MSY\) and \(B_{MSY}\)), and \(CE_{MSY}\), the predicted cpue at \(MSY\).
sau6 | sau7 | sau8 | sau9 | sau10 | sau11 | sau12 | sau13 | |
---|---|---|---|---|---|---|---|---|
B0 | 438.88 | 872.17 | 524.48 | 2438.88 | 2071.96 | 4152.79 | 3126.26 | 915.91 |
Bmsy | 149.87 | 272.80 | 166.07 | 748.36 | 616.67 | 1257.99 | 951.36 | 303.99 |
MSY | 20.27 | 43.74 | 24.94 | 122.49 | 102.78 | 207.63 | 156.60 | 41.74 |
Dmsy | 0.34 | 0.31 | 0.32 | 0.31 | 0.30 | 0.30 | 0.30 | 0.33 |
CEmsy | 140.63 | 115.89 | 194.81 | 198.17 | 142.31 | 140.29 | 91.11 | 75.48 |
Hmsy | 0.20 | 0.20 | 0.17 | 0.18 | 0.17 | 0.18 | 0.17 | 0.19 |
Bexmsy | 91.32 | 191.66 | 126.23 | 600.53 | 536.12 | 1018.44 | 792.97 | 193.29 |
11.1.20 scoremed
This contains arrays of the outputs from the HS for each sau and each replicate, along with the median values for each of the arrays.
num [1:30, 1:7] 42.8 35.3 31.8 31.5 33.4 ...