traitecoevo / plant

Trait-Driven Models of Ecology and Evolution :evergreen_tree:
https://traitecoevo.github.io/plant
53 stars 20 forks source link

equilibrium seed rain infinitely (probably) searching larger ranges #354

Closed itowers1 closed 1 year ago

itowers1 commented 1 year ago

Latest commit to fitness branch has now got demographic_equilibrium.Rmd working, but when it runs, delta(input-output) seems to be getting constantly larger which is not the desired behaviour. Needs to be investigated.

dfalster commented 1 year ago

So, it seems that when renaming seed_rain to birth_rate, many instances of seed_rain_out were incorrectly mapped to net_reproduction_ratio in this commit 3200b2d3c5ed780c3d9038d2c030ddcbe55818eb (for #297).

This is causing current issues with fitness related functions.

The equivalent of seed_rain_out is now offspring_production

So we need to go through and replace at multiple points, reverting changes made in the above commit.

e.g.

itowers1 commented 1 year ago

Went through and made a number of changes in commit (01df47aaaf97c447a5e581dd20ffd1da88c331d2) to replace net reproduction ratios with offspring produciton. Had to be careful though, because sometimes NRR is the required variable, so it left me with a number of situations where I was unsure what to do. Variables for which I was unsure are below:

net_reproduction_ratio_for_species r_net_reproduction_ratio_for_species net_reproduction_ratio_by_cohort net_reproduction_ratio_errors net_reproduction_ratio_by_cohort_weighted net_reproduction_ratio_for_species

in the following files:

inst/RcppR6_classes.yml R/scm_support.R inst/include/plant/scm.h inst/include/plant/species.h inst/include/plant/stochastic_patch_runner.h tests/testthat/test-scm.R

dfalster commented 1 year ago

Nice Isaac. Seems changes in two commits, also in 5e837df2a47eaa4e5c1081128924dac638a3e200