From 4b11014bfff19ab3d068cbbd8b9cef93374505d4 Mon Sep 17 00:00:00 2001
From: Daniel Vedder <daniel.vedder@idiv.de>
Date: Thu, 5 Jan 2023 10:31:17 +0100
Subject: [PATCH] Renamed lifehistory.jl -> populations.jl

---
 docs/src/nature.md                            | 7 ++++---
 src/Persephone.jl                             | 2 +-
 src/nature/{lifehistory.jl => populations.jl} | 9 ++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
 rename src/nature/{lifehistory.jl => populations.jl} (87%)

diff --git a/docs/src/nature.md b/docs/src/nature.md
index 4c012d1..da980c4 100644
--- a/docs/src/nature.md
+++ b/docs/src/nature.md
@@ -9,13 +9,14 @@ Modules = [Persephone]
 Pages = ["nature/nature.jl"]
 ```
 
-## lifehistory.jl
+## populations.jl
 
-This file contains a set of life-history related utility functions needed by species.
+This file contains a set of utility functions for species, including initialisation,
+reproduction, and mortality.
 
 ```@autodocs
 Modules = [Persephone]
-Pages = ["nature/lifehistory.jl"]
+Pages = ["nature/populations.jl"]
 ```
 
 ## ecologicaldata.jl
diff --git a/src/Persephone.jl b/src/Persephone.jl
index 2408f3f..904f54d 100644
--- a/src/Persephone.jl
+++ b/src/Persephone.jl
@@ -51,7 +51,7 @@ include("core/landscape.jl")
 include("farm/farm.jl")
 include("crop/crops.jl")
 include("nature/nature.jl")
-include("nature/lifehistory.jl")
+include("nature/populations.jl")
 include("nature/ecologicaldata.jl")
 #include("nature/species/skylark.jl")
 include("nature/species/wolpertinger.jl")
diff --git a/src/nature/lifehistory.jl b/src/nature/populations.jl
similarity index 87%
rename from src/nature/lifehistory.jl
rename to src/nature/populations.jl
index fd2f5c3..d08d404 100644
--- a/src/nature/lifehistory.jl
+++ b/src/nature/populations.jl
@@ -1,6 +1,7 @@
 ### Persephone - a socio-economic-ecological model of European agricultural landscapes.
 ###
-### This file contains a set of life-history related utility functions needed by species.
+### This file contains a set of utility functions for species, including initialisation,
+### reproduction, and mortality.
 ###
 
 """
@@ -26,8 +27,8 @@ function initrandompopulation(popsize::Union{Int64,Float64}, asexual::Bool=true)
 end
 
 #TODO initpopulation with habitat descriptor
-#TODO initpopulation with dispersal from an original source
-#TODO initpopulation based on known occurences in real-life
+#XXX initpopulation with dispersal from an original source?
+#XXX initpopulation based on known occurences in real-life?
 
 """
     reproduce!(animal, model, n=1)
@@ -35,8 +36,6 @@ end
 Produce one or more offspring for the given animal at its current location.
 """
 function reproduce!(animal::Animal, model::AgentBasedModel, n::Int64=1)
-    # XXX at the moment we don't have intra-specific variation, so currently we
-    # don't need sexual recombination here
     for i in 1:n
         sex = (animal.sex == hermaphrodite) ? hermaphrodite : rand([male, female])
         add_agent!(animal.pos, Animal, model, animal.traits, sex, 0)
-- 
GitLab