RUFAS.biophysical.animal.nutrients.nutrition_evaluator module#
- class RUFAS.biophysical.animal.nutrients.nutrition_evaluator.NutritionEvaluator#
Bases:
object
Checks if energy and nutrients supplied in a ration satisfy the demand of an animal or a pen’s average demand.
- classmethod evaluate_nutrition_supply(requirements: NutritionRequirements, supply: NutritionSupply, is_cow: bool) tuple[bool, NutritionEvaluationResults] #
Calculates the difference between nutrient demand and supply, if any.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements against which the nutrient supply will be compared.
- supplyNutritionSupply
Energy and nutrition supply against which nutrient requirements will be compared.
- is_cowbool
True if the requirements are for a cow or cows, false if they are for a heifer or heifer pen.
Returns#
- tuple[bool, NutritionEvaluationResults]
Boolean indicating if the ration has an amount of energy and nutrients sufficient to meet the given requirements, and an object containing a summary of all energy and nutrient surpluses and deficiencies.
- classmethod _calculate_total_energy_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts of total energy.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the total energy supplied and the total energy required (Mcal).
- classmethod _calculate_activity_maintenance_energy_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts energy for maintenance.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the maintenance energy supplied and the maintenance energy required (Mcal).
- classmethod _calculate_lactation_energy_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts energy for lactation.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the lactation energy supplied and the lactation energy required (Mcal).
- classmethod _calculate_growth_energy_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts energy for growth.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the growth energy supplied and the growth energy required (Mcal).
- classmethod _calculate_calcium_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts of calcium.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the calcium supplied and the calcium required (g).
- classmethod _calculate_phosphorus_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required amounts of phosphorus.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Difference between the phosphorus supplied and the phosphorus required (g).
- classmethod _calculate_protein_supplied(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates amount by which supplied protein under- or overshoots the required amount of protein.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Amount by which supplied protein under- or overshoots the required protein range (g).
- classmethod _calculate_neutral_detergent_fiber_supplied(_: NutritionRequirements, supply: NutritionSupply) float #
Calculates amount by which supplied neutral detergent fiber (NDF) under- or overshoots the required amount of NDF.
Parameters#
- _NutritionRequirements
This argument is provided to keep the method signature uniform with other helper methods.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Percentage by which supplied NDF under- or overshoots the required NDF range (percent).
- classmethod _calculate_forage_neutral_detergent_fiber_supplied(_: NutritionRequirements, supply: NutritionSupply) float #
Calculates amount by which supplied neutral detergent fiber (NDF) from forage undershoots the required amount of NDF.
Parameters#
- _NutritionRequirements
This argument is provided to keep the method signature uniform with other helper methods.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Percentage by which supplied NDF undershoots the required NDF range (percent).
- classmethod _calculate_fat_supplied(_: NutritionRequirements, supply: NutritionSupply) float #
Calculates difference between the supplied and required percentages of fat in the ration.
Parameters#
- _NutritionRequirements
This argument is provided to keep the method signature uniform with other helper methods.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Percentage by which supplied fat under- or overshoots the required fat range (percent).
- classmethod _calculate_dry_matter_intake(requirements: NutritionRequirements, supply: NutritionSupply) float #
Calculates amount by which supplied dry matter under- or overshoots the required amount dry matter.
Parameters#
- requirementsNutritionRequirements
Energy and nutrition requirements.
- supplyNutritionSupply
Energy and nutrition supplied by a ration.
Returns#
- float
Amount by which supplied dry matter under- or overshoots the required dry matter range (kg).