lkerr / groundfish-MSE

Development of Robust Management Strategies for Northeast Groundfish Fisheries in a Changing Climate
MIT License
4 stars 2 forks source link

Mle2718 sum cw and z #253

Closed mle2718 closed 2 years ago

mle2718 commented 2 years ago

@jerellejesse

Old: stock[[i]] <- get_fillRepArrays(stock = stock[[i]]) is executed before sumCW[y] is computed.

New: stock[[i]] <- get_fillRepArrays(stock = stock[[i]]) is executed after sumCW[y] is computed.

We could consolidate the loops that begin on lines 124 and 129 but this way is nice because it keeps the "output storage" separate from the rest of the code.

I tested this with both an economic and non-economic model and I believe it works.

One thing I noticed in some of my sims was that omvalGlobal[[i]]l$sumCW would be NA once in a while. This would happen for the last year. I think this will address that phenomenon.

mle2718 commented 2 years ago

This addresses #244