From 4666a099109c5adf1e1856abe70c3a4e93926a94 Mon Sep 17 00:00:00 2001 From: jadamchick <146877580+jadamchick@users.noreply.github.com> Date: Tue, 28 Jul 2026 12:09:54 -0400 Subject: [PATCH] minor updates to animal introduction and herd initialization sections --- docs/scientific/quarto-scidoc/qmd/animal.qmd | 11 +++++----- .../table_data/animal/tbl-an-herd-inputs.csv | 22 +++++++++---------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/scientific/quarto-scidoc/qmd/animal.qmd b/docs/scientific/quarto-scidoc/qmd/animal.qmd index 201a86f141..123de8c8d3 100644 --- a/docs/scientific/quarto-scidoc/qmd/animal.qmd +++ b/docs/scientific/quarto-scidoc/qmd/animal.qmd @@ -29,15 +29,14 @@ event occurring to simulate if that event occurs, and instantiation. Probability distributions used for that purpose are Normal Gaussian or Empirical. Each animal within the RuFaS herd progresses through five main life stages (calf, Heifer I, Heifer II, Heifer III, -and Cow) as illustrated in the figure below. +and Cow). * Calves progress to Heifer I when their age reaches the user-defined input for weaning day. * Heifer I progresses to Heifer II when their age reaches the user-defined input for breeding start day. * Heifer II animals that successfully conceive become Heifer III's when the number of days left in their pregnancy is equal to the user-defined input for prefresh days (default 21). * When a Heifer III calves, she becomes a Cow for the rest of her life on the RuFaS farm. -* Cows cycle through lactating and non-lactating phases until they are removed from the herd due to a failure to -conceive or a user-provided probability for sale or death within each parity (lactation). +* Cows cycle through lactating and non-lactating phases until they are removed from the herd due to low milk production or a user-provided probability for sale or death within each parity (lactation). When a Heifer III or Cow reaches full gestation length, they start lactating and a new calf object is created. The calf is assigned a birthweight according to a user-informed random distribution. All male calves are recorded and removed @@ -75,10 +74,10 @@ import_table( #### Required User Inputs ```{python} #| label: tbl-an-herd-inputs -#| tbl-cap: User inputs in the animal input file that influence the generation of the Animal Population (pre-animal-population). The inputs of this table are found in the Herd Initialization Section. +#| tbl-cap: User inputs in the animal input file that influence the generation of the pre-animal-population and selection of the post-animal-population. The inputs of this table are found in the Herd Initialization and Herd Information sections of the animal input json. import_table( "../resources/table_data/animal/tbl-an-herd-inputs.csv", - colalign = ["left", "left", "center", "center", "center"] + colalign = ["left", "left", "left", "center", "center", "center"] ) ``` @@ -118,7 +117,7 @@ The `_generate_animals()` method creates the `pre_animal_population`, with the o Calves are created according to the number specified by the user (`initial_animal_num`), some are sold based on user inputs, and those remaining proceed through select daily updates (growth, reproduction, milk, and transition through the appropriate life stages) for the user-specified number of days (`simulation_days`). The simulation occurs similarly to the regular life cycle simulation process, but with an extended period and large number of animals. There are a few notable distinctions: -* After 3000 days of simulation (specified in `animal_constants`), a copy of each heiferIII is saved to the replacement herd. The copy is made on the day when she is ready to transition to a lactating cow (ready to give birth), so that when the copy enters the herd as a purchased heiferIII during the actual simulation, she will give birth the very next day. +* After 3000 days of simulation (specified as `DAYS_TO_START_REPLACEMENT_HERD` in `animal_constants.py`), a copy of each heiferIII is saved to the replacement herd. The copy is made on the day when she is ready to transition to a lactating cow (ready to give birth), so that when the copy enters the herd as a purchased heiferIII during the actual simulation, she will give birth the very next day. * If a cow has made it to parity six without being culled, she is removed from the herd. (The maximum parity of cows kept in the generated herd is five). After the `simulation_days` number of days, the full herd contains a mixture of calves, heifers, cows, and replacements. The core status information and life history of each animal are either saved to file or passed for random sampling to create the `post-animal-population`. *Option 2: Point to an existing Animal Population* diff --git a/docs/scientific/quarto-scidoc/resources/table_data/animal/tbl-an-herd-inputs.csv b/docs/scientific/quarto-scidoc/resources/table_data/animal/tbl-an-herd-inputs.csv index 560dc45686..6d6726ab7d 100644 --- a/docs/scientific/quarto-scidoc/resources/table_data/animal/tbl-an-herd-inputs.csv +++ b/docs/scientific/quarto-scidoc/resources/table_data/animal/tbl-an-herd-inputs.csv @@ -1,11 +1,11 @@ - Variable , Definition , Default , Min , Max - Initial_animal_num , The initial number of animals that serve as a starting point for the population generation simulation ,10000,0, -- - Simulation_days , The number of days to simulate for the population generation simulation ,5000,0, -- - Calf_num , Number of Calves (head) -- The initial number of pre-weaned calves ,8,2, -- - HeiferI_num , Number of HeiferI animals (head) -- The initial number of heifers that are weaned but not yet bred ,44,2, -- - HeiferII_num ," Number of HeiferII animals (head) -- The initial number of heifers that are either eligible for breeding (based on user-inputted Breeding Start Day for heifers), or in early pregnancy ",38,2,-- - HeiferIII_num_springers ," Number of HeiferIII animals (head) -- The initial number of close-up heifers (within the user-defined close-up period, e.g., Prefresh Day) ",5,2,-- - Cow_num , Number of Cows (head) -- The initial number of dry and lactating cows ,100,6, -- - Replace_num , replacements (head) -- Number of replacement animals available in the replacement market ,5000,50, -- - Lactating_fraction , Fraction of cows that are lactating. Used during herd initialization ,0.8356,0,1 -" Parity_fractions: 1, 2, 3, 4, 5 "," Fractions of the milking animal population that are parity 1, 2, 3, 4, and 5+. The sum must equal 1.0 "," 0.36, 0.26, 0.18, 0.11, 0.09 ",0,1 +Process, Variable , Definition , Default , Min , Max +Generation, Initial_animal_num , The initial number of animals that serve as a starting point for the simulation that generates the pre-animal-population ,10000,0, -- +Generation, Simulation_days , The number of days to simulate for the population generation simulation ,5000,0, -- +Selection, Calf_num , Number of Calves (head) -- The initial number of pre-weaned calves ,8,2, -- +Selection, HeiferI_num , Number of HeiferI animals (head) -- The initial number of heifers that are weaned but not yet bred ,44,2, -- +Selection, HeiferII_num ," Number of HeiferII animals (head) -- The initial number of heifers that are either eligible for breeding (based on user-inputted Breeding Start Day for heifers), or in early pregnancy ",38,2,-- +Selection, HeiferIII_num_springers ," Number of HeiferIII animals (head) -- The initial number of close-up heifers (within the user-defined close-up period, e.g., Prefresh Day) ",5,2,-- +Selection, Cow_num , Number of Cows (head) -- The initial number of dry and lactating cows ,100,6, -- +Selection, Replace_num , Number of replacements (head) -- Number of replacement animals available in the replacement market ,5000,50, -- +Selection, Lactating_fraction , Initial fraction of cows that are lactating. ,0.8356,0,1 +Selection," Parity_fractions: 1, 2, 3, 4, 5 "," Initial fractions of the milking animal population that are parity 1, 2, 3, 4, and 5+. The sum must equal 1.0 "," 0.36, 0.26, 0.18, 0.11, 0.09 ",0,1