sizespectrum / mizer

Multi-species size-based ecological modelling in R
https://sizespectrum.org/mizer
38 stars 43 forks source link

Append argument in project function appears non-functional #287

Closed JamesRimmerEco closed 9 months ago

JamesRimmerEco commented 9 months ago

When using the project function to build-up fishing effort in a stepwise fashion, the projection keeps extending by the value of t_max. The append argument, when set to False, does not appear to prevent this behaviour. Work-around using setInitialValues circumnavigates this problem.

gustavdelius commented 9 months ago

This behaviour is as desired. For example

# create sim object with results for years 0 to 10
sim <- project(NS_params, t_max = 10)
getTimes(sim)

# running the simulation for a further 10 years
sim2 <- project(sim, t_max = 10, append = FALSE)
# this creates a sim object with results for years 10 to 20
getTimes(sim2)

# without the `append = FALSE` we get a sim object with
# results from year 0 to year 20
sim3 <- project(sim, t_max = 10)
getTimes(sim3)