Skip to content

Commit

Permalink
ffwd works now with 2-sex FLStocks
Browse files Browse the repository at this point in the history
  • Loading branch information
iagomosqueira committed Apr 5, 2024
1 parent 20088e8 commit 1077adb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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.9008
Version: 2.6.20.9010
Authors@R: c(
person("Iago", "Mosqueira", email = "iago.mosqueira@wur.nl",
role = "cre", comment=c(c(ORCID = "0000-0002-3252-0591"))),
Expand Down
5 changes: 2 additions & 3 deletions R/FLStock.R
Original file line number Diff line number Diff line change
Expand Up @@ -2245,12 +2245,11 @@ ffwd <- function(object, sr, fbar=control, control=fbar, deviances="missing") {
# rec * deviances
naa[1, i] <- rep(eval(sr@model[[3]],
c(as(sr@params, 'list'), list(
ssb=c(colSums(naa[, i - recage] * srp[, i - recage], na.rm=TRUE))))) /
dm[3], dm[3]) * c(deviances[, i])
ssb=c(colSums(naa[, i - recage, 1] * srp[, i - recage, 1],
na.rm=TRUE))))) / dm[3], each=dm[3]) * c(deviances[, i])
}

# UPDATE stock.n & harvest

stock.n(object)[, yrs] <- naa[, -1]
harvest(object)[, yrs] <- faa[, -1]

Expand Down

0 comments on commit 1077adb

Please sign in to comment.