Calculate nondemographic entrants across production cycles
Source:R/core_model_nondemographic_herd.R
calc_nondemo_start_sizes.RdDistributes the total number of animals entering a nondemographic cohort over the production cycles occurring within the simulated period, based on the number of cycle starts occurring within the fixed 365-day horizon.
Usage
calc_nondemo_start_sizes(
cohort_stock_nondemo_annual_entrants,
total_nondemo_cycle_starts_to_distribute
)Arguments
- cohort_stock_nondemo_annual_entrants
Numeric. Total number of animals entering the nondemographic production pathway over the simulated period for the assessed cohort block (
FNorMN) (heads / simulated period).- total_nondemo_cycle_starts_to_distribute
Integer. Total number of cycle starts within the fixed 365-day time horizon for the assessed non-demographic cohort (
FNorMN) (# cycle starts).
Value
A named list with the following element:
- cohort_stock_nondemo_start_cycle
Numeric. Number of animals starting each nondemographic production cycle for the assessed cohort block (
FNorMN), calculated by distributing total annual entrants over the total number of cycle starts (heads / cycle).
Details
The annual entrant stock is evenly distributed across all defined production cycle starts. The number of animals entering each cycle is calculated as:
$$ cohort\_stock\_nondemo\_start\_cycle = \frac{cohort\_stock\_nondemo\_annual\_entrants} {total\_non\_demo\_cycle\_starts\_to\_distribute} $$
where:
cohort_stock_nondemo_start_cycleis the number of animals entering each cyclecohort_stock_nondemo_annual_entrantsis the total annual entrantstotal_non_demo_cycle_starts_to_distributeis the number of cycle starts
No rounding or integer enforcement is applied:
This means fractional values may occur when
cohort_stock_nondemo_annual_entrants is not perfectly divisible
by total_non_demo_cycle_starts_to_distribute. Handling of integer constraints
(if required) is delegated to downstream processes.
This function is part of the run_nondemographic_herd_module().