RUFAS.data_structures.animal_to_manure_connection module#
- class RUFAS.data_structures.animal_to_manure_connection.StreamType(*values)#
Bases:
Enum
Enumeration of the types of manure streams.
Attributes#
- PARLOR: str
Represents manure from the parlor.
- GENERAL: str
Represents all manure other than what is deposited in or traveling to/from the milking parlor.
- PARLOR = 'parlor'#
- GENERAL = 'general'#
- class RUFAS.data_structures.animal_to_manure_connection.PenManureData(num_animals: int, manure_deposition_surface_area: float, animal_combination: AnimalCombination, pen_type: str | None, manure_urine_mass: float, manure_urine_nitrogen: float, stream_type: StreamType, first_processor: str | None = None, total_bedding_mass: float | None = None, total_bedding_volume: float | None = None)#
Bases:
object
Information about the pen or pens in which the manure was produced.
Attributes#
- num_animalsint
The number of animals in this pen that created the manure.
- manure_deposition_surface_areafloat
The surface area of the manure deposition area in the pen (m^2).
- animal_combinationAnimalCombination
The combination of animals in the pen.
- pen_typestr | None
The type of pen.
- manure_urine_massfloat
The overall mass of urine in the manure stream (kg).
- manure_urine_nitrogenfloat
The mass of nitrogen in the urine in the manure stream (kg).
- stream_typeStreamType
The type of manure stream in the pen.
- first_processorstr
The name of the first processor to handle the manure stream.
- total_bedding_mass: float
The total mass of the bedding applied to the manure stream (kg).
- total_bedding_volume: float
The total volume of the bedding applied to the manure stream (m^3).
- num_animals: int#
- manure_deposition_surface_area: float#
- animal_combination: AnimalCombination#
- pen_type: str | None#
- manure_urine_mass: float#
- manure_urine_nitrogen: float#
- stream_type: StreamType#
- first_processor: str | None = None#
- total_bedding_mass: float | None = None#
- total_bedding_volume: float | None = None#
- PEN_MANURE_DATA_UNITS = {'animal_combination': MeasurementUnits.UNITLESS, 'first_processor': MeasurementUnits.UNITLESS, 'manure_deposition_surface_area': MeasurementUnits.SQUARE_METERS, 'manure_urine_mass': MeasurementUnits.KILOGRAMS, 'manure_urine_nitrogen': MeasurementUnits.KILOGRAMS, 'num_animals': MeasurementUnits.ANIMALS, 'pen_type': MeasurementUnits.UNITLESS, 'stream_type': MeasurementUnits.UNITLESS, 'total_bedding_mass': MeasurementUnits.KILOGRAMS, 'total_bedding_volume': MeasurementUnits.CUBIC_METERS}#
- set_first_processor(processor_name: str) None #
- set_bedding_mass_and_volume(bedding_mass: float, bedding_volume: float) None #
- __init__(num_animals: int, manure_deposition_surface_area: float, animal_combination: AnimalCombination, pen_type: str | None, manure_urine_mass: float, manure_urine_nitrogen: float, stream_type: StreamType, first_processor: str | None = None, total_bedding_mass: float | None = None, total_bedding_volume: float | None = None) None #
- class RUFAS.data_structures.animal_to_manure_connection.ManureStream(water: float, ammoniacal_nitrogen: float, nitrogen: float, phosphorus: float, potassium: float, ash: float, non_degradable_volatile_solids: float, degradable_volatile_solids: float, total_solids: float, volume: float, pen_manure_data: PenManureData | None)#
Bases:
object
This class packages manure data for transfer between the Animal and Manure modules, as well as for transfer between Manure module processors.
Attributes#
- waterfloat
Mass of water in the manure stream (kg).
- ammoniacal_nitrogenfloat
Mass of ammoniacal nitrogen in the manure stream (kg).
- nitrogenfloat
Mass of total nitrogen in the manure stream (kg).
- phosphorus: float
Mass of phosphorus in the manure stream (kg).
- potassiumfloat
Mass of potassium in the manure stream (kg).
- ashfloat
Mass of ash in the manure stream (kg).
- non_degradable_volatile_solidsfloat
Mass of non-degradable volatile solids in the manure stream (kg).
- degradable_volatile_solidsfloat
Mass of degradable volatile solids in the manure stream (kg).
- total_solidsfloat
Mass of total solids in the manure stream (kg).
- volumefloat
Volume of the manure stream (m^3).
- pen_manure_dataPenManureData | None
Optional, more specific information about the manure and the pen or pens that produced it.
Class Attributes#
- MANURE_STREAM_UNITSdict[str, MeasurementUnits | None]
A dictionary mapping manure stream attributes and properties to their respective measurement units.
- water: float#
- ammoniacal_nitrogen: float#
- nitrogen: float#
- phosphorus: float#
- potassium: float#
- ash: float#
- non_degradable_volatile_solids: float#
- degradable_volatile_solids: float#
- total_solids: float#
- volume: float#
- pen_manure_data: PenManureData | None#
- MANURE_STREAM_UNITS = {'ammoniacal_nitrogen': MeasurementUnits.KILOGRAMS, 'ash': MeasurementUnits.KILOGRAMS, 'degradable_volatile_solids': MeasurementUnits.KILOGRAMS, 'mass': MeasurementUnits.KILOGRAMS, 'nitrogen': MeasurementUnits.KILOGRAMS, 'non_degradable_volatile_solids': MeasurementUnits.KILOGRAMS, 'pen_manure_data': None, 'phosphorus': MeasurementUnits.KILOGRAMS, 'potassium': MeasurementUnits.KILOGRAMS, 'total_solids': MeasurementUnits.KILOGRAMS, 'total_volatile_solids': MeasurementUnits.KILOGRAMS, 'volume': MeasurementUnits.CUBIC_METERS, 'water': MeasurementUnits.KILOGRAMS}#
- property is_empty: bool#
Returns True if all nutrient, solids, and volume values are zero and pen_manure_data is None.
- property total_volatile_solids: float#
Amount of the total volatile solids (kg).
- property mass: float#
Mass of the manure stream (kg).
- clear_pen_manure_data() None #
Clears the pen manure data instance.
- classmethod make_empty_manure_stream() ManureStream #
Factory method for making empty ManureStreams.
- split_stream(split_ratio: float, stream_type: StreamType | None = None) ManureStream #
Splits this manure stream using the specified ratio.
Parameters#
- split_ratiofloat
Proportion of this stream to split into the new stream.
- stream_typeStreamType | None, default None
Type to assign to the new manure stream’s PenManureData, if applicable.
Returns#
- ManureStream
A new ManureStream instance representing the split portion.
Raises#
- ValueErrorcov
If split_ratio is not between 0 and 1.
- __init__(water: float, ammoniacal_nitrogen: float, nitrogen: float, phosphorus: float, potassium: float, ash: float, non_degradable_volatile_solids: float, degradable_volatile_solids: float, total_solids: float, volume: float, pen_manure_data: PenManureData | None) None #