RUFAS.routines.manure.manure_handlers.manure_handler_classes module#

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.ManureHandlerType(*values)#

Bases: Enum

Enumerates the different types of manure handlers.

Attributes#

FLUSH_SYSTEMstr

A system which uses a surge of water to flush manure from the gutter.

MANUAL_SCRAPINGstr

A system whereby a blade is dragged along the floor of the barns to push or pull the manure to a designated area.

ALLEY_SCRAPERstr

A system whereby a “V”-shaped mechanical blade that is dragged over an alley by chain or cable to pull manure to a collection channel.

TILLAGEstr

A system whereby the manure is handled via tillage methods.

HARROWINGstr

A system whereby the manure is handled via harrowing methods.

FLUSH_SYSTEM = 'flush system'#
MANUAL_SCRAPING = 'manual scraping'#
ALLEY_SCRAPER = 'alley scraper'#
TILLAGE = 'tillage'#
HARROWING = 'harrowing'#
class RUFAS.routines.manure.manure_handlers.manure_handler_classes.BaseManureHandler(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: object

Base class for all manure handlers.

Attributes#

namestr

The name of the manure handler.

weatherWeather

A Weather object.

timeRufasTime

A RufasTime object.

configManureHandlerConfig

A ManureHandlerConfig object that specifies default data specific to the choice of manure handler.

milking_parlorMilkingParlor

A MilkingParlor object that handles relevant calculations related to the time lactating cows spent there.

__init__(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Initialize a BaseManureHandler object.

Parameters#

namestr

The name of the manure handler.

weatherWeather

A Weather object.

timeRufasTime

A RufasTime object.

manure_handler_configManureHandlerConfig

A ManureHandlerInitData object that specifies default data specific to the choice of manure handler.

_get_current_day_average_temperature_in_celsius() float#

Gets the average temperature of the day, in Celsius.

Returns#

The average temperature of the day, in Celsius.

daily_update(pen: ManureManagerPen, bedding: BaseBedding | None, sim_day: int) ManureHandlerDailyOutput#

Calculate the daily manure handler output based on input passed from the animal module.

Parameters#

penManureManagerPen

A ManureManagerPen object that stores relevant information about the pen that can helpful in the manure module.

beddingBaseBedding | None

A BaseBedding object that specifies the type of bedding use or None if no bedding is used.

sim_dayint

The current simulation day.

Returns#

ManureHandlerDailyOutput

A ManureHandlerDailyOutput object that stores the daily manure handler output. See details in the class definition (ManureHandlerDailyOutput).

calc_cleaning_water_volume_in_main_barn(num_animals: int) float#

Calculate the volume of cleaning water needed for all the animals in pen.

Attributes#

num_animalsint

The number of animals in the pen.

Returns#

Volume of cleaning water needed for the given pen, L.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.FlushSystem(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: BaseManureHandler

A class that handles calculations related to a flush system.

Attributes#

All inherited from BaseManureHandler.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.ManualScraping(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: BaseManureHandler

A class that handles calculations related to manual scraping.

Attributes#

All inherited from BaseManureHandler.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.AlleyScraper(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: BaseManureHandler

A class that handles calculations related to an alley scraper.

Attributes#

All inherited from BaseManureHandler.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.Tillage(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: BaseManureHandler

A class that handles calculations related to tillage.

Attributes#

All inherited from BaseManureHandler.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.Harrowing(name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig)#

Bases: BaseManureHandler

A class that handles calculations related to harrowing.

Attributes#

All inherited from BaseManureHandler.

class RUFAS.routines.manure.manure_handlers.manure_handler_classes.ManureHandlerConfig(*, manure_handler_type: ManureHandlerType, cleaning_water_use_rate: float, minutes_per_cleaning: int, cleanings_per_day: int, daily_tillage_frequency: int, cleaning_water_recycle_fraction: float)#

Bases: object

Class for storing the configuration of a manure handler.

Attribute#

manure_handler_type: ManureHandlerType

The class of manure handlers that this configuration falls into.

cleaning_water_use_ratefloat

Amount of cleaning water used per animal per day, L.

minutes_per_cleaningint

Number of minutes needed per animal per cleaning, minutes.

cleanings_per_dayint

Number of cleanings per day.

daily_tillage_frequencyint

Number of times per day that compost bedding is tilled.

cleaning_water_recycle_fractionfloat

Fraction of cleaning water that is from recycled (not fresh) water sources.

manure_handler_type: ManureHandlerType#
cleaning_water_use_rate: float#
minutes_per_cleaning: int#
cleanings_per_day: int#
daily_tillage_frequency: int#
cleaning_water_recycle_fraction: float#
__init__(*, manure_handler_type: ManureHandlerType, cleaning_water_use_rate: float, minutes_per_cleaning: int, cleanings_per_day: int, daily_tillage_frequency: int, cleaning_water_recycle_fraction: float) None#
class RUFAS.routines.manure.manure_handlers.manure_handler_classes.ManureHandlerFactory#

Bases: object

A class that contains the logic for creating different types of manure handlers.

classmethod get_manure_handler(configuration_name: str, weather: Weather, time: RufasTime, manure_handler_config: ManureHandlerConfig) BaseManureHandler | FlushSystem | AlleyScraper | ManualScraping | Tillage | Harrowing#

Returns an instance of a specific subtype of BaseManureHandler.

Parameters#

configuration_namestr

A string that specifies the configuration of the generated manure handler.

weatherWeather

A Weather object.

timeRufasTime

A RufasTime object.

manure_handler_configManureHandlerConfig

A ManureHandlerConfig object that containing initialization data.

Returns#

BaseManureHandler | FlushSystem | AlleyScraper | ManualScraping | Tillage | Harrowing

A new instance of a BaseManureHandler subtype.