Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions docs/scientific/quarto-scidoc/qmd/animal.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"]
)
```

Expand Down Expand Up @@ -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*
Expand Down
Original file line number Diff line number Diff line change
@@ -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