Skip to content

Commit

Permalink
ffwd works correctly now when fbar=0
Browse files Browse the repository at this point in the history
  • Loading branch information
iagomosqueira committed Apr 3, 2024
1 parent af3e6a8 commit 20088e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: FLCore
Title: Core Package of FLR, Fisheries Modelling in R
Version: 2.6.20.9006
Version: 2.6.20.9008
Authors@R: c(
person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl",
role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))),
Expand Down
3 changes: 3 additions & 0 deletions R/FLStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -2213,9 +2213,12 @@ ffwd <- function(object, sr, fbar=control, control=fbar, deviances="missing") {

# COMPUTE harvest
fages <- range(object, c("minfbar", "maxfbar"))

faa[, -1] <- (sel[, -1] %/%
quantMeans(sel[ac(seq(fages[1], fages[2])), -1])) %*% fbar

faa[is.na(faa)] <- 0

# COMPUTE SRP multiplier
waa <- stock.wt(obj)
mat <- mat(obj)
Expand Down

0 comments on commit 20088e8

Please sign in to comment.