Skip to content

Commit

Permalink
removed spin-up in virtualPop
Browse files Browse the repository at this point in the history
  • Loading branch information
marchtaylor committed Aug 28, 2018
1 parent 48196d0 commit 43c90ea
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 32 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -11,4 +11,4 @@ Description: Contains functions for describing fish growth, mortality,
License: GPL-3
BugReports: https://github.com/marchtaylor/fishdynr/issues
URL: https://github.com/marchtaylor/fishdynr
RoxygenNote: 6.0.1
RoxygenNote: 6.1.0
2 changes: 0 additions & 2 deletions R/optim.stockSim.R
Expand Up @@ -27,7 +27,6 @@
#' Fisheries ecology and management. Princeton University Press.
#'
#' @examples
#' \donttest{
#' set.seed(1)
#' data(tilapia)
#' params <- tilapia
Expand Down Expand Up @@ -76,7 +75,6 @@
#' axis(4, col=2)
#' mtext("Yt", side=4, line=3, col=2)
#' par(op)
#' }
#'
#' @export
#'
Expand Down
17 changes: 7 additions & 10 deletions R/virtualPop.R
Expand Up @@ -23,8 +23,6 @@
#' @param timemin.date date corresponding to timemin (of "Date" class)
#' @param tincr time increment for simulation (default = 1/12; i.e. 1 month)
#' @param N0 starting number of individuals
#' @param initializePop logical. Should initial population be approximated
#' based on SRR equilibrium
#' @param fished_t times when stock is fished
#' @param lfqFrac fraction of fished stock that are sampled for length frequency data (default = 0.1).
#' @param progressBar Logical. Should progress bar be shown in console (Default=TRUE)
Expand Down Expand Up @@ -56,7 +54,7 @@
#' @examples
#'
#' set.seed(1)
#' res <- virtualPop(initializePop = TRUE, rmax = 1e4)
#' res <- virtualPop(rmax = 1e4)
#' names(res)
#'
#' op <- par(mfcol=c(2,1), mar=c(4,4,1,1))
Expand Down Expand Up @@ -153,7 +151,6 @@ L50 = 0.25*Linf.mu, wqs = L50*0.2,
bin.size = 1,
timemin = 0, timemax = 10, timemin.date = as.Date("1980-01-01"),
N0 = 5000,
initializePop = TRUE,
fished_t = seq(timemin+5,timemax,tincr),
lfqFrac = 1,
progressBar = TRUE
Expand Down Expand Up @@ -423,16 +420,16 @@ record.inds <- function(inds, ids=1:10, rec=NULL){
# Initial population
lastID <- 0

if(initializePop){
inds <- equilibrium.inds()
inds <- express.inds(inds)
inds$mat <- as.numeric(inds$L > inds$Lmat)
} else {
# if(initializePop){
# inds <- equilibrium.inds()
# inds <- express.inds(inds)
# inds$mat <- as.numeric(inds$L > inds$Lmat)
# } else {
inds <- make.inds(
id=seq(N0)
)
inds <- express.inds(inds)
}
# }


# results object
Expand Down
13 changes: 7 additions & 6 deletions man/lfqGen.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions man/optim.stockSim.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 6 additions & 9 deletions man/virtualPop.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43c90ea

Please sign in to comment.