Closed pfrater closed 7 years ago
Regarding this, why don’t you read the recl value directly from the renewal file? That would be a more elegant solution.
I had considered that, but didn't do it because the initial data is already there in the stock information. I suppose the renewal data would be as well, but initial data has to be present in the gadgetstock
object whereas renewal data doesn't necessarily have to be there. For example, if you have a two stock model with immature and mature stocks, the imm stock will have renewal data present in the gadgetstock
object, but the mature stock won't.
Let me know if you still think going at it from the renewal file would be better and I can change it up.
No just leave it as is for the moment. One thing we need to give some thought is different growth models, i.e. not the usual vonB function, would be implemented in this setting.
Currently my goal with gadget.fit
is that it would only rely on the output from Gadget, and remove all functions that rely on reading the model files as they tend to break when something that hadn't been thought about occurs. I have already done this with the fleet selection and recruitment is next on my list. Regarding the growth I would be more inclined to create a separate function that works on a gadgetstock
object.
Fair enough. Perhaps it would just be best within gadget.fit
to pull age and length data from stock.std and output that for the growth. Age-based growth is only used in gadget.fit
anyways so that should work.
I submitted these two commits a while back, but I don't think they ever got merged.