flr / FLBEIA

Bio-Economic Impact Assessment of Management strategies using FLR
11 stars 13 forks source link

Conditioning a fixed population stock #14

Open marchtaylor opened 7 years ago

marchtaylor commented 7 years ago

Dear FLBEIA users,

I have a question regarding the conditioning of stocks without population dynamics in FLBEIA. I hope it's OK that I post the question here, since it's not necessarily an 'issue', but rather a request for guidance.

I am trying to incorporate some stocks into my FLBEIA model for which I am not using a biological growth model; i.e.growth.model= 'fixedPopulation'. These stocks will only be given a TAC in the projection, and historical capturability by the fleet/metier should inform how TAC is distributed.

For these stocks, their respective biols levels don't really contain any information. In some cases, I provide a @wt slot, but I'm guessing that this is not needed in a fixed population. Or should I set all slots to 1.0 (e.g. @n, @m, @wt, @fec, @spwn)?

For the fleets object, I have total landings and discards information by fleet/metier. Until now, I have substituted this information directly as as the @landings.n and @discards.n slots, and then set @landings.wt and @discards.wt slots to 1.0. This information is then called by the helper function 'create.fleets.data()' to create the fleets object.

Another (relevant?) setting is that I have used 'CobbDouglasBio' as the catch model in fleets.ctrl. I changed this from my original setting of 'CobbDouglasAge', which gave errors due to the fact that these stocks only contain 1 age class.

Following my conditioning, I'm getting the following error when running FLBEIA: Error in if (any((Ba[[st]][, , , , , i] * cth[st, i] - Cat[, , , , , i]) < : missing value where TRUE/FALSE needed

I'm in the process of checking that this is not due to some other issue, but if anyone can comment on my conditioning assumptions, I would greatly appreciate it.

Cheers, M

dorleta commented 7 years ago

Hi Mark,

You can use the list: flbeia@azti.esmailto:flbeia@azti.es if you want, the disadvantage is that this list is only for internal azti users…

I tend to set all the slots to 1.0, is should work leaving them empty but as there are many possible interactions in FLBEIA I’m always afraid that if I use NA something could crash. So my recommendation is setting it to 1, if you leave them empty and you get and error let us know to solve the problem.

I do the same for fleets and the correct function as you said is CobbDouglasBio.

It seems that you have an NA around, have you checked that the TAC for this stock in the advice object is not empty? The biomass (@n slot in FLBiols) is also filled for the whole projection? AS it is a fixed population fro which not biomass dynamics or HCR is used the biomass and the TAC advice should be filled.

Look at this and if the problem continues let as know,

Dorleta

De: marchtaylor [mailto:notifications@github.com] Enviado el: martes, 14 de marzo de 2017 11:45 Para: flr/FLBEIA FLBEIA@noreply.github.com CC: Subscribed subscribed@noreply.github.com Asunto: [flr/FLBEIA] Conditioning a fixed population stock (#14)

Dear FLBEIA users,

I have a question regarding the conditioning of stocks without population dynamics in FLBEIA. I hope it's OK that I post the question here, since it's not necessarily an 'issue', but rather a request for guidance.

I am trying to incorporate some stocks into my FLBEIA model for which I am not using a biological growth model; i.e.growth.model= 'fixedPopulation'. These stocks will only be given a TAC in the projection, and historical capturability by the fleet/metier should inform how TAC is distributed.

For these stocks, their respective biols levels don't really contain any information. In some cases, I provide a @wthttps://github.com/wt slot, but I'm guessing that this is not needed in a fixed population. Or should I set all slots to 1.0 (e.g. @nhttps://github.com/n, @mhttps://github.com/m, @wthttps://github.com/wt, @fechttps://github.com/fec, @spwnhttps://github.com/spwn)?

For the fleets object, I have total landings and discards information by fleet/metier. Until now, I have substituted this information directly as as the @landings.n and @discards.n slots, and then set @landings.wt and @discards.wt slots to 1.0. This information is then called by the helper function 'create.fleets.data()' to create the fleets object.

Another (relevant?) setting is that I have used 'CobbDouglasBio' as the catch model in fleets.ctrl. I changed this from my original setting of 'CobbDouglasAge', which gave errors due to the fact that these stocks only contain 1 age class.

Following my conditioning, I'm getting the following error when running FLBEIA: Error in if (any((Ba[[st]][, , , , , i] * cth[st, i] - Cat[, , , , , i]) < : missing value where TRUE/FALSE needed

I'm in the process of checking that this is not due to some other issue, but if anyone can comment on my conditioning assumptions, I would greatly appreciate it.

Cheers, M

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/flr/FLBEIA/issues/14, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEz9MkKu1f4aC-hxDZukbUECwN6XH4d8ks5rlm_BgaJpZM4McZtp.

marchtaylor commented 7 years ago

Thank you very much Dorleta. So I will continue to use the issues page for stuff like this in order to address the whole FLBEIA community.

Your tips are going to help me a lot. I do, in fact, have NAs in the biols object for the projection years, so I will fix that. TAC is defined already for projection years.

So, that will get me started - I'll let you know how things go.

thanks again, -Marc

marchtaylor commented 7 years ago

Hi Dorleta,

Your suggestions did indeed solve my issue. I filled in the biols[["x"]]@n slots through the projection years. I also realized that without this, my catchability slots (@catch.q) were being set to zero in projection years. Thanks so much for your quick reply!

-Marc