Closed aornugent closed 2 years ago
Oh my bad - I thought FF16r had fallen out of use, other than as an example of strategy inheritance, but I now see that it's called in the StochasticSpecies test. I can re-enable the custom fraction_allocation_reproduction
and then either:
That's awesome!
Hi all, Nice Andrew!
The above two commits
recruitment_decay
option on the FF16 model (and thereby all FF16 models), with default value of 0. So set it to something higher (e.g. 5) to get the effect Andrew demonstratedSo @Becca-90, you should
run_my_patch
function:exclamation: No coverage uploaded for pull request base (
develop@bb14fd9
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## develop #330 +/- ##
==========================================
Coverage ? 78.52%
==========================================
Files ? 99
Lines ? 8727
Branches ? 0
==========================================
Hits ? 6853
Misses ? 1874
Partials ? 0
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update bb14fd9...c7e527c. Read the comment docs.
Well it seems I'm making a mess out of this. Will fix.
Ok, working now ;)
Hi @aornugent -- I've updated all the tidy_patch materials. Is this Ok to merge into develop?
Addresses #321, #309, #308, #331
Looking good @dfalster ! I love the new framework for visualisation. I've left a few comments on the workflow doc for your review, but hopefully all minor. @Becca-90 - I've updated the test script:
Recruitment decay = 5
base_parameters <- function(recruitment_decay) {
p0$strategy_default$recruitment_decay = recruitment_decay
return(p0)
}
run_decay_patch <- function(
traits = trait_matrix(c(0.07), c("lma")),
B_lf1 = 1,
seed_rain = 100,
recruitment_decay = 0,
find_equilbrium = FALSE,
optimise_schedule = FALSE,
latitude = 28.182
) {
p0 = base_parameters(recruitment_decay)
hyper_par_fn = make_FF16_hyperpar(B_lf1 = B_lf1, latitude = latitude)
p1 <- expand_parameters(traits, p0, hyper_par_fn, mutant = FALSE)
p1$seed_rain <- seed_rain
if(find_equilbrium)
result <- equilibrium_seed_rain(p1)
else if(optimise_schedule)
result <- build_schedule(p1)
else
result <- p1
# gather outputs at each time step
run_scm_collect(result)
}
out <- run_decay_patch(recruitment_decay = 5)
results <- out %>% tidy_patch() %>% expand_state_FF16()
totals <- results$species %>% integrate_over_size_distribution()
totals %>%
ggplot(aes(time, individuals, colour=species)) +
geom_line() +
coord_cartesian(expand = F) +
theme_classic()
Which confirms that recruitment of individuals drops after the first wave:
Thanks @aornugent
Daniel and I tinkered with this model during our investigation of lockup, but it never made it onto Github. A single parameter
reproduction_decay
is introduced that governs the change in establishment probability over time.We can see that as
recruitment_decay
increases, the establishment of late successional cohorts declines to zero, leaving only the first wave of cohorts having a material density.Recruitment decay = 0
Recruitment decay = 0.2
Recruitment decay = 5
I haven't caught up with Daniel's fancy
tidy_patch
framework, but here's how to edit this parameter and plot results: