yield <- getYield(NS_sim)
yield[c("1972", "2010"), c("Herring", "Cod")]
# Running simulation for another year, saving intermediate time steps
params <- setInitialValues(getParams(NS_sim), NS_sim)
sim <- project(params, t_save = 0.1, t_max = 1,
t_start = 2010, progress_bar = FALSE)
# The yield rate for Herring decreases during the year
getYield(sim)[, "Herring"]
# We get the total catch in the year by averaging over the year
sum(getYield(sim)[1:10, "Herring"] / 10)
Run the code above in your browser using DataLab