With the addition of the AnimalCommunity class, the logic for where certain functions are kept needs to be examined. My intention is to get through a broader implementation of trophic dynamics (with predation and spatial search) and then get review the logic.
David gave me some good suggestions for this below:
Should this be a method of `AnimalCohort`? A cohort will have a number of individuals in a given (average) state that might be capable of reproducing and generating a new cohort. Then at the `AnimalCommunity` level, the update might do something like:
for this_name, these_cohorts in self.cohorts.items():
# generate new cohorts for this functional group
new_cohorts_for_name = [chrt.reproduce() for chrt in these_cohorts if chrt.can_reproduce()]
# potentially merge those new cohorts (all age=0) if we don't care
# (currently/ever) about maternal and paternal effects.
self.cohorts[this_name].extend(new_cohorts_for_name)
I don't think there's any issue with the content of this method, but it logically feels like it should be a step further in?
With the addition of the AnimalCommunity class, the logic for where certain functions are kept needs to be examined. My intention is to get through a broader implementation of trophic dynamics (with predation and spatial search) and then get review the logic.
David gave me some good suggestions for this below:
I don't think there's any issue with the content of this method, but it logically feels like it should be a step further in?
_Originally posted by @davidorme in https://github.com/ImperialCollegeLondon/virtual_rainforest/pull/198#discussion_r1196301394_