Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General suggestion for summary functions #58

Open
marchtaylor opened this issue Aug 31, 2021 · 0 comments
Open

General suggestion for summary functions #58

marchtaylor opened this issue Aug 31, 2021 · 0 comments

Comments

@marchtaylor
Copy link
Contributor

Rather than make a changes myself and push, I thought I would simply propose a very simple suggestion regarding some of the summary functions; specifically regarding the economic parameters.

I have only recently been looking into the economic outputs in detail. I currently do not use a covars object, but have only used the vcosts and fcosts. The summary functions look for additional variables in the covars, and set these to zeros when null. The problem with this approach is in cases where the covars are multiplicative and not additive. I think the multiplicative case may only apply to covars$NumbVessels, which are used in the totfcost_flbeia function: return(fleet@fcost * covars[["NumbVessels"]][flnm, ]). In my case, since I do not define this covar, I get zero total costs.

I am suggesting a change to the fltSum function, so that when multiplicative variable covars are missing, they should be replaced with 1.0 instead of 0.0.

e.g. create an empty FLQuant with 1's is needed, in addition to the one with 0's:

  FLQ0.dimfleets <- FLQuant(0, dimnames = c(fleet = list(names(fleets)), ### 0.0 as default for additive factors
    dimnames(fleets[[1]]@effort[, , ])[2:6]))
  FLQ1.dimfleets <- FLQuant(1, dimnames = c(fleet = list(names(fleets)), ### 1.0 as default for multiplicative factors
    dimnames(fleets[[1]]@effort[, , ])[2:6]))

and use FLQ1.dimfleets in place of FLQ0.dimfleets for covars$NumbVessels when NULL:

  if (is.null(covars$NumbVessels)) 
    covars$NumbVessels <- FLQ1.dimfleets # changed to 1.0 multiplier (multiplicative in totfcost_flbeia)

It could be that a similar change is required for vesselStkSum.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant