RUFAS.biophysical.animal.nutrients.nrc_requirements_calculator module#

class RUFAS.biophysical.animal.nutrients.nrc_requirements_calculator.NRCRequirementsCalculator#

Bases: NutritionRequirementsCalculator

Animal requirements calculator class, based on NRC’s methodology.

classmethod calculate_requirements(body_weight: float, mature_body_weight: float, day_of_pregnancy: int | None, body_condition_score_5: float, days_in_milk: int | None, average_daily_gain_heifer: float | None, animal_type: AnimalType, parity: int, calving_interval: int | None, milk_fat: float, milk_true_protein: float, milk_lactose: float, milk_production: float, housing: str, distance: float, previous_temperature: float | None, net_energy_diet_concentration: float, days_born: float, TDN_percentage: float, process_based_phosphorus_requirement: float) NutritionRequirements#

Calculates energy and nutrition requirements for an animal using the NRC methodology.

Parameters#

body_weightfloat

Body weight (kg).

mature_body_weightfloat

Mature body weight (kg).

day_of_pregnancyint

Day of pregnancy (days).

body_condition_score_5float

Body condition score (score from 1 to 5).

days_in_milkint | None

Days in milk (days).

average_daily_gain_heiferfloat

Average daily gain (grams per day).

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

parityint

Parity number (lactation 1, 2.. n).

calving_intervalint

Calving interval (days).

milk_fatfloat

Fat contents in milk (%).

milk_true_proteinfloat

True protein contents in milk (%).

milk_lactosefloat

Lactose contents in milk (%).

milk_production: float

Daily milk yield (kg).

housingstr

Housing type (Barn or Grazing).

distancefloat

Distance walked (m).

previous_temperaturefloat

Adjustment for previous temperature.

net_energy_diet_concentrationfloat

Metabolizable energy density of formulated ration.

days_bornfloat

Number of days since birth (days).

TDN_percentagefloat

Percentage of Total Digestible Nutrients in previously fed ration (%).

Returns#

NutritionRequirements

NutritionRequirements instance containing all the required amounts of energy and nutrition.

classmethod _calculate_maintenance_energy_requirements(body_weight: float, mature_body_weight: float, day_of_pregnancy: int | None, body_condition_score_5: float, previous_temperature: float | None, animal_type: AnimalType) tuple[float, float, float]#

Calculates energy requirement for maintenance, conceptus weight, and calf birth weight according to NRC (2001).

Parameters#

body_weightfloat

Body weight (kg).

mature_body_weightfloat

Mature body weight (kg).

day_of_pregnancyint

Day of pregnancy (days).

body_condition_score_5float

Body condition score (score from 1 to 5).

previous_temperaturefloat

Adjustment for previous temperature.

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

Returns#

tuple[float, float, float]

Net energy requirement for maintenance (Mcal/day), conceptus weight (kg), and calf birth weight (kg).

Notes#

[AN.NRC.1] [AN.NRC.2] [AN.NRC.3] [AN.NRC.4] [AN.NRC.5] [AN.NRC.6] [AN.NRC.7] Energy requirements for activity are not included within calculations for maintenance.

References#

Chapter 2 “Energy”,pp. 18-25, 2001.

classmethod _calculate_growth_energy_requirements(body_weight: float, mature_body_weight: float, conceptus_weight: float, animal_type: AnimalType, parity: int, calving_interval: int | None, average_daily_gain_heifer: float | None) tuple[float, float, float]#

Calculates energy requirement for growth, average daily gain and estimate of shrunk body weight according to NRC (2001).

Parameters#

body_weightfloat

Body weight (kg).

mature_body_weightfloat

Mature body weight (kg).

conceptus_weightfloat

Conceptus weight (kg).

animal_typeAnimalType

A type or subtype of animal specified in AnimalType enum.

parityint

Parity number (lactation 1, 2.. n).

calving_intervalint

Calving interval (days).

average_daily_gain_heiferfloat

Average daily gain (grams per day).

Notes#

[AN.NRC.13], [AN.NRC.14], [AN.NRC.15], [AN.NRC.16], [AN.NRC.17], [AN.NRC.18], [AN.NRC.19] [AN.NRC.20], [AN.NRC.21], [AN.NRC.22], [AN.NRC.23], [AN.NRC.24] Returns ——- tuple[float, float, float]

Net energy requirement for growth (Mcal/d), average daily gain (g/d), equivalent shrunk body weight (kg).

References#

classmethod _calculate_pregnancy_energy_requirements(day_of_pregnancy: int | None, calf_birth_weight: float) float#

Calculates energy requirement for pregnancy according to NRC (2001).

Parameters#

day_of_pregnancyint

Day of pregnancy (days).

calf_birth_weightfloat

Calf birth weight (kg).

Returns#

float

Net energy requirement for pregnancy (Mcal/d).

Notes#

[AN.NRC.25], [AN.NRC.26] Day_of_pregnancy are counted from 190 day_of_pregnancy once pregnancy is confirmed. Otherwise, this nutritional requirement is assumed to be zero.

References#

classmethod _calculate_protein_requirement(body_weight: float, conceptus_weight: float, day_of_pregnancy: int | None, animal_type: AnimalType, milk_production: float, milk_true_protein: float, calf_birth_weight: float, net_energy_growth: float, average_daily_gain: float, equivalent_shrunk_body_weight: float, dry_matter_intake_estimate: float, TDN_conc: float | None = 0.7) float#

Calculates the protein requirement for maintenance according to NRC (2001).

Parameters#

body_weightfloat

Body weight (kilograms).

conceptus_weightfloat

Conceptus weight (kilograms).

day_of_pregnancyint

Day of pregnancy (days).

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

milk_production: float

Milk yield (kg/d).

milk_true_proteinfloat

True protein contents in milk (%).

calf_birth_weightfloat

Calf birth weight.

net_energy_growthfloat

Net energy requirement for growth (Mcal/d).

average_daily_gainfloat

Average daily gain (grams per day).

equivalent_shrunk_body_weightfloat

Equivalent shrunk body weight (kilograms).

dry_matter_intake_estimatefloat

Estimated dry matter intake according to empirical prediction equation within NASEM (2021) (kg/d).

TDN_conc:

Concentration (percent value) of Total Digestible Nutrients in previously fed ration.

Returns#

float

Metabolizable protein requirement (g/day).

Notes#

[AN.NRC.29], [AN.NRC.31], [AN.NRC.32],[AN.NRC.33], [AN.NRC.34],[AN.NRC.35], [AN.NRC.36], [AN.NRC.37],[AN.NRC.38]

bacteria_estimate: Bacteria metabolizable protein production (g). TDN: Total digestible nutrients maintenance: Metabolizable protein requirement for maintenance (g). net_growth: Net protein requirement for growth (g). metabolizable_to_net_efficiency: Efficiency of converting metabolizable protein to net protein metabolizable_growth: Metabolizable protein requirement for growth (g). pregnancy: Metabolizable protein requirement for pregnancy (g). lactation: Metabolizable protein requirement for lactation (g).

References#

classmethod _calculate_calcium_requirement(body_weight: float, mature_body_weight: float, day_of_pregnancy: int | None, animal_type: AnimalType, average_daily_gain: float, milk_production: float) float#

Calculates total calcium requirement according to NRC (2001).

Parameters#

body_weightfloat

Body weight (kilograms).

mature_body_weightfloat

Mature body weight (kilograms).

day_of_pregnancyint

Day of pregnancy (days).

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

average_daily_gainfloat

Average daily gain (grams per day).

milk_production: float

Milk yield (kg/d).

Notes#

[AN.NRC.39],[AN.NRC.41], [AN.NRC.43], [AN.NRC.45],[AN.NRC.47], [AN.NRC.49]

Returns#

float

Calcium requirement (grams per day).

References#

classmethod _calculate_phosphorus_requirement(body_weight: float, mature_body_weight: float, day_of_pregnancy: int | None, milk_production: float, animal_type: AnimalType, average_daily_gain: float, dry_matter_intake_estimate: float) float#

Calculates total phosphorus requirement according to NRC (2001).

Parameters#

body_weightfloat

Body weight (kilograms).

mature_body_weightfloat

Mature body weight (kilograms).

day_of_pregnancyint

Day of pregnancy (days).

milk_production: float

Milk yield (kg/d).

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

average_daily_gainfloat

Average daily gain (grams per day).

dry_matter_intake_estimatefloat

Estimated dry matter intake (kg/d).

Notes#

[AN.NRC.42], [AN.NRC.44], [AN.NRC.46],[AN.NRC.48], [AN.NRC.50]

Returns#

float

Phosphorus requirement (grams per day).

References#

classmethod _calculate_dry_matter_intake(animal_type: AnimalType, body_weight: float, day_of_pregnancy: int, days_in_milk: int | None, milk_production: float, milk_fat: float, net_energy_diet_concentration: float, days_born: float) float#

Calculates dry matter intake according to NRC (2001).

Parameters#

animal_typeAnimalType

A type or subtype of animal specified in the AnimalType enum.

body_weightfloat

Body weight (kilograms).

day_of_pregnancyint

Day of pregnancy (days).

days_in_milkint

Days in milk (days).

milk_productionfloat

Milk yield (kg/d).

milk_fatfloat

Fat contents in milk (%).

net_energy_diet_concentrationfloat

Metabolizable energy density of formulated ration.

days_bornfloat

Number of days since birth (days).

Returns#

dry_matter_intake_estimatefloat

Dry matter intake (kilograms per day).

Notes#

[AN.NRC.51], [AN.NRC.52], [AN.NRC.53], [AN.NRC.54], [AN.NRC.55] The sum of dry matter intake of each feed is assumed to be less than dry matter intake estimation (Sum of Feed < dry_matter_intake_estimate).

References#

classmethod _calculate_activity_energy_requirements(body_weight: float, housing: str, distance: float) float#

Calculates the net energy for activity requirement portion of the energy requirements.

Parameters#

body_weightfloat

Body weight (kg).

housingstr

Housing type (Barn or Grazing).

distancefloat

Distance walked (m).

Returns#

float

Net energy requirement for activity (Mcal/day).

Notes#

[AN.NRC.8],[AN.NRC.9], [AN.NRC.10], [AN.NRC.11], [AN.NRC.12] Activity requirement (net_energy_activity) is proportional to body weight and daily walking distance. Grazing system and hilly topography will cost additional energy. Grazing is not implemented yet in the current version of code.

References#