RUFAS.data_structures.feed_storage_to_animal_connection module#

class RUFAS.data_structures.feed_storage_to_animal_connection.FeedCategorization(*values)#

Bases: Enum

NASEM and NRC categorizations of feeds.

ANIMAL_PROTEIN = 'Animal Protein'#
BY_PRODUCT_OTHER = 'By-Product/Other'#
CALF_LIQUID_FEED = 'Calf Liquid Feed'#
ENERGY_SOURCE = 'Energy Source'#
FAT_SUPPLEMENT = 'Fat Supplement'#
FATTY_ACID_SUPPLEMENT = 'Fatty Acid Supplement'#
GRAIN_CROP_FORAGE = 'Grain Crop Forage'#
GRASS_LEGUME_FORAGE = 'Grass/Legume Forage'#
PASTURE = 'Pasture'#
PLANT_PROTEIN = 'Plant Protein'#
VITAMIN_MINERAL = 'Vitamin/Mineral'#
class RUFAS.data_structures.feed_storage_to_animal_connection.FeedComponentType(*values)#

Bases: Enum

NASEM and NRC types of feeds.

AMINOACIDS = 'Aminoacids'#
FORAGE = 'Forage'#
CONC = 'Conc'#
MILK = 'Milk'#
MINERAL = 'Mineral'#
VITAMINS = 'Vitamins'#
STARTER = 'Starter'#
NO = 'No'#
class RUFAS.data_structures.feed_storage_to_animal_connection.NutrientStandard(*values)#

Bases: Enum

The nutrient standards supported in RuFaS.

NASEM = 'NASEM'#
NRC = 'NRC'#
class RUFAS.data_structures.feed_storage_to_animal_connection.Feed(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float)#

Bases: object

Base representation of a feed in RuFaS.

Attributes#

rufas_idRUFAS_ID

Unique integer identifier for feeds used within the RuFaS model (unitless).

Fd_CategoryFeedCategorization

Feed category (unitless).

feed_typeFeedComponentType

General type or category of the feed (unitless).

DMfloat

Percentage of fresh mass that is dry matter of the feed.

ashfloat

Ash contents (% dry matter).

CPfloat

Crude protein content of the feed (% dry matter).

N_Afloat

Nitrogen Fraction A (% crude protein).

N_Bfloat

Nitrogen Fraction B (% crude protein).

N_Cfloat

Nitrogen Fraction C (% crude protein).

Kdfloat

Feed degradation rate of B fraction (% per hour).

dRUPfloat

Digested rumen undegradable protein (% of rumen undigestable protein).

ADICPfloat

Acid detergent insoluble nitrogen multiplied by 6.25 (% dry matter).

NDICPfloat

Neutral detergent insoluble nitrogen multiplied by 6.25 (% dry matter).

ADFfloat

Acid detergent fiber (% dry matter).

NDFfloat

Neutral detergent fiber (% dry matter).

ligninfloat

Acid detergent lignin (% dry matter).

starchfloat

Starch (% dry matter).

EEfloat

Ether extract (% dry matter).

calciumfloat

Calcium (% dry matter).

phosphorusfloat

Phosphorus (% dry matter).

magnesiumfloat

Magnesium (% dry matter).

potassiumfloat

Potassium (% dry matter).

sodiumfloat

Sodium (% dry matter).

chlorinefloat

Chlorine (% dry matter).

sulfurfloat

Sulphur (% dry matter).

is_fatbool

Identifier of fat type feed (unitless).

is_wetforagebool

Identifier of wet forage type feed (unitless).

unitsMeasurementUnits

The units with which the feed is measured.

limitfloat

Upper limit of feed that is allowed to be used in a single animal’s diet (kg).

lower_limitfloat

Lower limit of feed that is allowed to be used in a single animal’s diet (kg).

TDNfloat

Total digestible nutrients (% dry matter).

DEfloat

Digestible energy (Mcal / kg).

amount_availablefloat

Amount of feed currently or expected to be available (kg).

on_farm_costfloat

Price of using the feed that is already on-farm ($ / kg).

purchase_costfloat

Price of buying feed from off-farm ($ / kg).

rufas_id: int#
Fd_Category: FeedCategorization#
feed_type: FeedComponentType#
DM: float#
ash: float#
CP: float#
N_A: float#
N_B: float#
N_C: float#
Kd: float#
dRUP: float#
ADICP: float#
NDICP: float#
ADF: float#
NDF: float#
lignin: float#
starch: float#
EE: float#
calcium: float#
phosphorus: float#
magnesium: float#
potassium: float#
sodium: float#
chlorine: float#
sulfur: float#
is_fat: bool#
is_wetforage: bool#
units: MeasurementUnits#
limit: float#
lower_limit: float#
TDN: float#
DE: float#
amount_available: float#
on_farm_cost: float#
purchase_cost: float#
__init__(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.NASEMFeed(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float, Name: str, RUP: float, sol_prot: float, NDF48: float, WSC: float, FA: float, DE_Base: float, copper: float, iron: float, manganese: float, zinc: float, molibdenum: float, chromium: float, cobalt: float, iodine: float, selenium: float, arginine: float, histidine: float, isoleucine: float, leucine: float, lysine: float, methionine: float, phenylalanine: float, threonine: float, triptophan: float, valine: float, C120_FA: float, C140_FA: float, C160_FA: float, C161_FA: float, C180_FA: float, C181t_FA: float, C181c_FA: float, C182_FA: float, C183_FA: float, otherFA_FA: float, NPN_source: float, starch_digested: float, FA_dig: float, P_inorg: float, P_org: float, B_Carotene: float, biotin: float, choline: float, niacin: float, Vit_A: float, Vit_D: float, Vit_E: float, Abs_calcium: float, Abs_phosphorus: float, Abs_sodium: float, Abs_chloride: float, Abs_potassium: float, Abs_copper: float, Abs_iron: float, Abs_magnesium: float, Abs_manganesum: float, Abs_zinc: float)#

Bases: Feed

NASEM-specific representation of a RuFaS feed.

Attributes#

Namestr

Feed name (unitless).

RUPfloat

Rumen undegradable protein (% crude protein).

sol_protfloat

Soluble protein (% crude protein).

NDF48float

In vitro 48-hour digestibility (% Neutral Detergent Fiber).

WSCfloat

Water soluble carbohydrates (% dry matter).

FAfloat

Fatty acids (% dry matter).

DE_Basefloat

Digestible energy standard (Mcal / kg).

copper : float iron : float manganese : float zinc : float molibdenum : float chromium : float cobalt : float iodine : float selenium : float arginine : float histidine : float isoleucine : float leucine : float lysine : float methionine : float phenylalanine : float threonine : float triptophan : float valine : float C120_FA : float C140_FA : float C160_FA : float C161_FA : float C180_FA : float C181t_FA : float C181c_FA : float C182_FA : float C183_FA : float otherFA_FA : float NPN_source : float starch_digested : float FA_dig : float P_inorg : float P_org : float B_Carotene : float biotin : float choline : float niacin : float Vit_A : float Vit_D : float Vit_E : float Abs_calcium : float Abs_phosphorus : float Abs_sodium : float Abs_chloride : float Abs_potassium : float Abs_copper : float Abs_iron : float Abs_magnesium : float Abs_manganesum : float Abs_zinc : float

Name: str#
RUP: float#
sol_prot: float#
NDF48: float#
WSC: float#
FA: float#
DE_Base: float#
copper: float#
iron: float#
manganese: float#
zinc: float#
molibdenum: float#
chromium: float#
cobalt: float#
iodine: float#
selenium: float#
arginine: float#
histidine: float#
isoleucine: float#
leucine: float#
lysine: float#
methionine: float#
phenylalanine: float#
threonine: float#
triptophan: float#
valine: float#
C120_FA: float#
C140_FA: float#
C160_FA: float#
C161_FA: float#
C180_FA: float#
C181t_FA: float#
C181c_FA: float#
C182_FA: float#
C183_FA: float#
otherFA_FA: float#
NPN_source: float#
starch_digested: float#
FA_dig: float#
P_inorg: float#
P_org: float#
B_Carotene: float#
biotin: float#
choline: float#
niacin: float#
Vit_A: float#
Vit_D: float#
Vit_E: float#
Abs_calcium: float#
Abs_phosphorus: float#
Abs_sodium: float#
Abs_chloride: float#
Abs_potassium: float#
Abs_copper: float#
Abs_iron: float#
Abs_magnesium: float#
Abs_manganesum: float#
Abs_zinc: float#
__init__(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float, Name: str, RUP: float, sol_prot: float, NDF48: float, WSC: float, FA: float, DE_Base: float, copper: float, iron: float, manganese: float, zinc: float, molibdenum: float, chromium: float, cobalt: float, iodine: float, selenium: float, arginine: float, histidine: float, isoleucine: float, leucine: float, lysine: float, methionine: float, phenylalanine: float, threonine: float, triptophan: float, valine: float, C120_FA: float, C140_FA: float, C160_FA: float, C161_FA: float, C180_FA: float, C181t_FA: float, C181c_FA: float, C182_FA: float, C183_FA: float, otherFA_FA: float, NPN_source: float, starch_digested: float, FA_dig: float, P_inorg: float, P_org: float, B_Carotene: float, biotin: float, choline: float, niacin: float, Vit_A: float, Vit_D: float, Vit_E: float, Abs_calcium: float, Abs_phosphorus: float, Abs_sodium: float, Abs_chloride: float, Abs_potassium: float, Abs_copper: float, Abs_iron: float, Abs_magnesium: float, Abs_manganesum: float, Abs_zinc: float) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.NRCFeed(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float, non_fiber_carb: float, PAF: float)#

Bases: Feed

NRC-specific representation of a RuFaS feed.

Attributes#

non_fiber_carbfloat

Non fiber carbohydrates (% dry matter).

PAFfloat

Processing adjustment factor.

non_fiber_carb: float#
PAF: float#
__init__(rufas_id: int, Fd_Category: FeedCategorization, feed_type: FeedComponentType, DM: float, ash: float, CP: float, N_A: float, N_B: float, N_C: float, Kd: float, dRUP: float, ADICP: float, NDICP: float, ADF: float, NDF: float, lignin: float, starch: float, EE: float, calcium: float, phosphorus: float, magnesium: float, potassium: float, sodium: float, chlorine: float, sulfur: float, is_fat: bool, is_wetforage: bool, units: MeasurementUnits, limit: float, lower_limit: float, TDN: float, DE: float, amount_available: float, on_farm_cost: float, purchase_cost: float, non_fiber_carb: float, PAF: float) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.TotalInventory(available_feeds: dict[int, float], inventory_date: date)#

Bases: object

Contains information about the amounts of feeds held at the specified date.

Attributes#

available_feedslist[Feed]

List of Feeds which are held by the Feed Storage module and are available to feed to animals.

inventory_datedate

Date at which the amounts of feeds expected to be held.

available_feeds: dict[int, float]#
inventory_date: date#
__init__(available_feeds: dict[int, float], inventory_date: date) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.IdealFeeds(ideal_feeds: dict[int, float])#

Bases: object

Amounts of feeds that would ideally be purchased before the next harvest of a crop.

Attributes#

ideal_feedsdict[RUFAS_ID, float]

Amounts of feeds which would ideally be purchased before the next harvest of a crop, where the key is the RuFaS Feed ID and the value is the requested feed amount (kg).

ideal_feeds: dict[int, float]#
__init__(ideal_feeds: dict[int, float]) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.RequestedFeed(requested_feed: dict[int, float])#

Bases: object

Total amounts of feed needed for the herd.

Attributes#

requested_feeddict[RUFAS_ID, float]

Amounts of feeds to be fed to the herd, where the key is the RuFaS Feed ID and the value is the requested feed amount (kg).

requested_feed: dict[int, float]#
__init__(requested_feed: dict[int, float]) None#
class RUFAS.data_structures.feed_storage_to_animal_connection.PurchaseAllowance(feed_config_data: list[dict[str, int | float]])#

Bases: object

Limits on amounts of feeds that may be purchased at a given time.

Attributes#

allowancesdict[RUFAS_ID, float]

Amounts of feeds that may be purchased, where the key is the RuFaS Feed ID and the value is the maximum amount of that feed (kg).

_purchase_allowance_key: str#
__init__(feed_config_data: list[dict[str, int | float]]) None#
_setup_purchase_allowance(feed_config_data: list[dict[str, int | float]]) dict[int, float]#
class RUFAS.data_structures.feed_storage_to_animal_connection.PlanningCycleAllowance(feed_config_data: list[dict[str, int | float]])#

Bases: PurchaseAllowance

User-defined limits on feeds that may be purchased between harvests of a crop.

_purchase_allowance_key: str = 'planning_cycle_allowance'#
class RUFAS.data_structures.feed_storage_to_animal_connection.AdvancePurchaseAllowance(feed_config_data: list[dict[str, int | float]])#

Bases: PurchaseAllowance

User-defined limits on feeds that may be purchased at the beginning of a ration interval.

_purchase_allowance_key: str = 'advance_purchase_allowance'#
class RUFAS.data_structures.feed_storage_to_animal_connection.RuntimePurchaseAllowance(feed_config_data: list[dict[str, int | float]])#

Bases: PurchaseAllowance

User-defined limits on feeds that may be purchased on a daily basis.

_purchase_allowance_key: str = 'runtime_purchase_allowance'#