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.
@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.