RUFAS.biophysical.animal.nutrients.nutrition_supply_calculator module#

class RUFAS.biophysical.animal.nutrients.nutrition_supply_calculator.FeedInRation(amount: float, info: Feed)#

Bases: object

Defines the amount of feed in a ration (kg) and all the nutritive info associated with it, in a Feed instance.

amount: float#
info: Feed#
__init__(amount: float, info: Feed) None#
class RUFAS.biophysical.animal.nutrients.nutrition_supply_calculator.NutritionSupplyCalculator#

Bases: object

Calculates the energy and nutrients supplied by a ration.

nutrient_standard: NutrientStandard#
nutrients_to_calculate = ['NDF', 'EE', 'CP', 'ADF', 'TDN', 'lignin', 'ash', 'potassium', 'starch']#
classmethod calculate_nutrient_supply(feeds_used: list[Feed], ration_formulation: dict[int, float], body_weight: float) NutritionSupply#

Calculates the energy and nutrients supplied in a ration.

Parameters#

feeds_usedlist[Feed]

List of feeds that were used to construct the ration formulation.

ration_formulationdict[RUFAS_ID, float]

Maps the RuFaS ID of a feed to the amount fed in a ration (kg dry matter).

Returns#

NutritionSupply

NutritionSupply instance containing the energy and nutritive content of the given ration.

classmethod _calculate_nutrient_intake_discount(feeds: list[FeedInRation], body_weight: float) float#

Calculates discount applied to Total Digestible Nutrients (TDN) and Digestible Energy (DE).

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

body_weightfloat

Body weight of an animal (kg).

Returns#

float

Discount used to calculate the actual TDN and DE content of feeds in the ration.

Notes#

[AN.SUP.1], [AN.SUP.2], [AN.SUP.3, [AN.SUP.4]

References#

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_actual_metabolizable_energy(feeds: list[FeedInRation], actual_digestible_energy: dict[int, float]) dict[int, float]#

Calculates the actual metabolizable energy of feeds.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

actual_digestible_energydict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the discounted digestible energy content (Mcal / kg) of the corresponding feed.

Returns#

dict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the actual metabolizable energy content of the corresponding feed (Mcal / kg).

Notes#

[AN.SUP.5] References ———-

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_actual_maintenance_net_energy(feeds: list[FeedInRation], actual_metabolizable_energy: dict[int, float]) float#

Calculates the actual net energy of the ration available to use for maintenance.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

actual_metabolizable_energydict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the actual metabolizable energy content (Mcal / kg) of the feed.

Returns#

float

Total actual net energy available for maintenance in the ration (Mcal).

Notes#

[AN.SUP.7] References ———- [1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_actual_lactation_net_energy(feeds: list[FeedInRation], actual_metabolizable_energy: dict[int, float], actual_digestible_energy: dict[int, float]) float#

Calculates the actual net energy of the ration available to use for lactation.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

actual_digestible_energydict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the discounted digestible energy content (Mcal / kg) of the feed.

actual_metabolizabledict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the actual metabolizable energy content (Mcal / kg) of the feed.

Returns#

float

Total actual net energy available for lactation in the ration (Mcal).

Notes#

[AN.SUP.6]

References#

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_actual_growth_net_energy(feeds: list[FeedInRation], actual_metabolizable_energy: dict[int, float]) float#

Calculates the actual net energy of the ration available to use for growth.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

actual_metabolizabledict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the actual metabolizable energy content (Mcal / kg) of the feed.

Returns#

float

Total actual net energy available for growth in the ration (Mcal).

Notes#

[AN.SUP.8]

References#

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_calcium_supply(feeds: list[FeedInRation]) float#

Calculates the calcium supply in the ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

Returns#

float

Total digestible calcium supply in the ration (g).

Notes#

[AN.SUP.15]

References#

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_phosphorus_supply(feeds: list[FeedInRation]) float#

Calculates the phosphorus supply in the ration.

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

float

Total digestible phosphorus supply in the ration (g).

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_metabolizable_protein_supply(feeds: list[FeedInRation], dry_matter_intake: float, actual_tdn_percentages: dict[int, float], body_weight: float) float#

Calculates amount of metabolizable protein in ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

dry_matter_intakefloat

Total dry matter contained in the ration (kg).

actual_tdn_percentagesdict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to the discounted Total Digestable Nutrition (TDN) percentage of the feed.

body_weightfloat

The body weight of an animal (kg).

Returns#

float

Total metabolizable protein in the ration (g).

Notes#

[AN.SUP.9],[AN.SUP.10],[AN.SUP.11],[AN.SUP.12],[AN.SUP.13],[AN.SUP.14],

[AN.SUP.27], [AN.SUP.29], [AN.SUP.30]

References#

Notes#

Endogenous metabolizable protein is calculated from the dry matter intake, but the units of the protein are grams while the dry matter intake is in kilograms, see page 319 of [1].

classmethod _calculate_percentage_of_concentrates(feeds: list[FeedInRation], dry_matter_intake: float) float#

Calculates percentage of dry matter in ration that is concentrate.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

dry_matter_intakefloat

Total dry matter contained in the ration (kg).

Returns#

float

Percentage of the ration’s dry matter which is made up of concentrates (percent).

classmethod _calculate_protein_passage_rates(feeds: list[FeedInRation], dry_matter_intake: float, body_weight: float, percentage_concentrates: float) dict[int, float]#

Calculates the protein passage rate of feeds in ration.

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

dry_matter_intakefloat

Total dry matter contained in the ration (kg).

body_weightfloat

The body weight of an animal (kg).

percentage_concetratesdict[RUFAS_ID, float]

Percentage of the ration’s dry matter which is made up of concentrates.

dict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to protein passage rates (percentage / hour).

[AN.SUP.25]

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_rumen_degradable_protein_percentages(feeds: list[FeedInRation], protein_passage_rates: dict[int, float]) dict[int, float]#

Calculates rumen degradable protein (RDP) percentages of feeds in ration.

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

protein_passage_ratesdict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to protein passage rates (percentage / hour).

dict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to RDP percentages (percent).

[AN.SUP.26]

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_rumen_undegradable_protein_percentages(feeds: list[FeedInRation], rumen_degradable_protein_percentages: dict[int, float]) dict[int, float]#

Calculates rumen undegradable protein (RUP) percentages of feeds in ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

rumen_degradable_protein_percentagesdict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to RDP percentages.

Returns#

dict[RUFAS_ID, float]

Mapping of RuFaS Feed IDs to RUP percentages (percent).

Notes#

[AN.SUP.28]

References#

[1] National Research Council, “Nutrient Requirements of Dairy Cattle, 7th edition.” National Academic Press,

classmethod _calculate_nutritive_content(feeds: list[FeedInRation], nutrient: str) float#

Calculates the content of a specific nutrient in a ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

nutrientstr

Name of the nutrient.

Returns#

float

Total supply of nutrient in a ration (kg).

classmethod _calculate_digestible_energy(feeds: list[FeedInRation]) float#

Calculates the amount of digestible energy in a ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

Returns#

float

Total supply of nutrient in a ration (Mcal).

Notes#

[AN.SUP.4]

classmethod _calculate_byproducts_supply(feeds: list[FeedInRation]) float#

Calculates the amount of byproducts in a ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

Returns#

float

Total supply of byproduct in a ration (kg dry matter).

classmethod _calculate_forage_neutral_detergent_fiber_content(feeds: list[FeedInRation]) float#

Calculates the neutral detergent fiber (NDF) content supplied by forages in a ration.

Parameters#

feedslist[FeedInRation]

List of feeds in ration, including the amount and nutritive properties.

Returns#

float

Total supply of NDF from forages in a ration (kg).