optigob.livestock.livestock_budget
This module contains the LivestockBudget class, which is responsible for managing and optimizing livestock populations, emissions, protein yields, and land use within the FORESIGHT framework. The class integrates with data managers and optimization models to compute livestock-related budgets and outputs under various scenarios.
- Classes:
LivestockBudget: Manages and optimizes livestock populations, emissions, protein, and land use.
- - __init__(self, optigob_data_manager, net_zero_budget=None, split_gas_budget=None)
Initialize the LivestockBudget class and set up all required budgets, data managers, and scenario parameters.
- - _get_total_area_commitment(self)
Calculate the total area commitment for all land uses that compete with livestock (rewetted, afforested, biomethane, willow, protein crops).
- - _load_optimisation_outputs(self)
Load and cache the livestock optimisation outputs if not already loaded.
- - _get_total_non_livestock_emission_ch4(self)
Calculate total CH4 emissions from all relevant land uses and sectors in the scenario.
- - get_ch4_budget(self)
Calculate the CH4 budget for the scenario, based on baseline emissions and the split gas fraction.
- - get_split_gas_ch4_emission(self)
Calculate the remaining CH4 budget after accounting for all scenario emissions, under the split gas approach.
- - get_optimisation_outputs(self)
Run the livestock population optimisation for the current scenario and constraints.
- - get_dairy_population(self)
Get the optimised dairy cow population for the scenario.
- - get_beef_population(self)
Get the optimised beef cow population for the scenario.
- - _get_scaled_beef_population(self)
Get the beef cow population, scaled by the emission scaler for the scenario.
- - _get_scaled_dairy_population(self)
Get the dairy cow population, scaled by the emission scaler for the scenario.
- - get_dairy_cows_co2_emission(self)
Calculate the total CO2 emissions from dairy cows for the scenario.
- - get_dairy_cows_ch4_emission(self)
Calculate the total CH4 emissions from dairy cows for the scenario.
- - get_dairy_cows_n2o_emission(self)
Calculate the total N2O emissions from dairy cows for the scenario.
- - get_dairy_cows_co2e_emission(self)
Calculate the total CO2e emissions from dairy cows for the scenario.
- - get_beef_cows_co2_emission(self)
Calculate the total CO2 emissions from beef cows for the scenario.
- - get_beef_cows_ch4_emission(self)
Calculate the total CH4 emissions from beef cows for the scenario.
- - get_beef_cows_n2o_emission(self)
Calculate the total N2O emissions from beef cows for the scenario.
- - get_beef_cows_co2e_emission(self)
Calculate the total CO2e emissions from beef cows for the scenario.
- - get_total_co2_emission(self)
Calculate the total CO2 emissions from all livestock (dairy and beef) for the scenario.
- - get_total_ch4_emission(self)
Calculate the total CH4 emissions from all livestock (dairy and beef) for the scenario.
- - get_total_n2o_emission(self)
Calculate the total N2O emissions from all livestock (dairy and beef) for the scenario.
- - get_total_co2e_emission(self)
Calculate the total CO2e emissions from all livestock (dairy and beef) for the scenario.
- - get_dairy_cows_area(self)
Calculate the total land area required for dairy cows.
- - get_beef_cows_area(self)
Calculate the total land area required for beef cows.
- - get_total_area(self)
Calculate the total land area required for all livestock (dairy and beef).
- - get_total_beef_protein(self)
Calculate the total protein production from beef and dairy+beef systems for the scenario.
- - get_total_milk_protein(self)
Calculate the total milk protein production from dairy cows for the scenario.
- - get_hnv_area(self)
Calculate the area of high nature value (HNV) grassland managed by beef cows, including both beef and dairy+beef systems.
Attributes
Classes
The LivestockBudget class manages and optimizes livestock populations, emissions, protein yields, and land use within the FORESIGHT framework. |
Module Contents
- optigob.livestock.livestock_budget.logger
- class optigob.livestock.livestock_budget.LivestockBudget(optigob_data_manager, net_zero_budget=None, split_gas_budget=None)
The LivestockBudget class manages and optimizes livestock populations, emissions, protein yields, and land use within the FORESIGHT framework. It integrates with data managers and optimization models to compute livestock-related budgets, emissions, protein yields, and land requirements under various scenarios.
- net_zero_budget
Emissions budget for net zero scenarios.
- Type:
float or None
- split_gas_budget
Emissions budget for split gas scenarios.
- Type:
float or None
- data_manager_class
Instance of the data manager for accessing scenario and scaler data.
- optimisation
Optimisation engine for livestock populations.
- Type:
- baseline_emission
Baseline emissions calculator.
- Type:
- other_land_budget
Budget for other land uses.
- Type:
- forest_budget
Budget for forest land uses.
- Type:
- bio_energy_budget
Budget for bioenergy land uses.
- Type:
- protein_crop_budget
Budget for protein crop land uses.
- Type:
- static_ag_budget
Budget for static agriculture land uses.
- Type:
- rewetted_area
Area of rewetted organic soils (ha).
- Type:
float
- afforested_area
Area for afforestation (ha).
- Type:
float
- biomethane_area
Area for biomethane production (ha).
- Type:
float
- willow_area
Area for willow production (ha).
- Type:
float
- protein_crop_area
Area for protein crops (ha).
- Type:
float
- _milk_protein
Protein content scaler for milk.
- Type:
float
- _beef_protein
Protein content scaler for beef.
- Type:
float
- target_year
Target year for scenario.
- Type:
int
- scenario
Abatement scenario name.
- Type:
str
- abatement
Abatement type.
- Type:
str
- get_livestock_ratio_type
Type of livestock ratio constraint.
- Type:
str
- livestock_ratio_value
Value for livestock ratio constraint.
- Type:
float
- split_gas_approach
Whether split gas approach is used.
- Type:
bool
- split_gas_frac
Fraction for split gas approach.
- Type:
float
- ch4_baseline
Baseline CH4 emissions (kt).
- Type:
float
- ch4_budget
CH4 budget for split gas approach (kt).
- Type:
float
- _optimisation_outputs
Cached optimisation outputs.
- Type:
dict or None
- net_zero_budget = None
- split_gas_budget = None
- data_manager_class
- optimisation
- baseline_emission
- other_land_budget
- forest_budget
- bio_energy_budget
- protein_crop_budget
- static_ag_budget
- rewetted_area
- afforested_area
- biomethane_area
- willow_area
- protein_crop_area
- _milk_protein
- _beef_protein
- target_year
- scenario
- abatement
- get_livestock_ratio_type
- livestock_ratio_value
- split_gas_approach
- split_gas_frac
- _optimisation_outputs = None
- _get_total_area_commitment()
Calculate the total area commitment for all land uses that compete with livestock (rewetted, afforested, biomethane, willow, protein crops).
- Returns:
Total area commitment in hectares (ha).
- Return type:
float
- _load_optimisation_outputs()
Load and cache the livestock optimisation outputs if not already loaded.
- Returns:
Dictionary of optimisation results for livestock populations and constraints.
- Return type:
dict
- Raises:
ValueError – If optimization was infeasible.
- _get_total_non_livestock_emission_ch4()
Calculate total CH4 (methane) emissions from all relevant land uses and sectors in the scenario.
- Returns:
Total CH4 emissions in kilotonnes (kt).
- Return type:
float
- get_ch4_budget()
Calculate the CH4 (methane) budget for the scenario, based on baseline emissions and the split gas fraction.
- Returns:
CH4 budget in kilotonnes (kt).
- Return type:
float
- get_split_gas_ch4_emission()
Calculate the remaining CH4 (methane) budget after accounting for all scenario emissions, under the split gas approach.
- Returns:
Remaining CH4 budget in kilotonnes (kt).
- Return type:
float
- get_optimisation_outputs()
Run the livestock population optimisation for the current scenario and constraints.
- Returns:
Dictionary of optimised livestock populations and related outputs.
- Return type:
dict
- Raises:
ValueError – If the scenario is mathematically infeasible before optimization.
- get_dairy_population()
Get the optimised dairy cow population for the scenario.
- Returns:
Number of dairy cows.
- Return type:
float
- get_beef_population()
Get the optimised beef cow population for the scenario.
- Returns:
Number of beef cows.
- Return type:
float
- _get_scaled_beef_population()
Get the beef cow population, scaled by the emission scaler for the scenario.
- Returns:
Scaled beef cow population.
- Return type:
float
- _get_scaled_dairy_population()
Get the dairy cow population, scaled by the emission scaler for the scenario.
- Returns:
Scaled dairy cow population.
- Return type:
float
- get_dairy_cows_co2_emission()
Calculate the total CO2 emissions from dairy cows for the scenario.
- Returns:
CO2 emissions from dairy cows in kilotonnes (kt).
- Return type:
float
- get_dairy_cows_ch4_emission()
Calculate the total CH4 emissions from dairy cows for the scenario.
- Returns:
CH4 emissions from dairy cows in kilotonnes (kt).
- Return type:
float
- get_dairy_cows_n2o_emission()
Calculate the total N2O emissions from dairy cows for the scenario.
- Returns:
N2O emissions from dairy cows in kilotonnes (kt).
- Return type:
float
- get_dairy_cows_co2e_emission()
Calculate the total CO2e (CO2 equivalent) emissions from dairy cows for the scenario.
- Returns:
CO2e emissions from dairy cows in kilotonnes (kt).
- Return type:
float
- get_beef_cows_co2_emission()
Calculate the total CO2 emissions from beef cows for the scenario.
- Returns:
CO2 emissions from beef cows in kilotonnes (kt).
- Return type:
float
- get_beef_cows_ch4_emission()
Calculate the total CH4 emissions from beef cows for the scenario.
- Returns:
CH4 emissions from beef cows in kilotonnes (kt).
- Return type:
float
- get_beef_cows_n2o_emission()
Calculate the total N2O emissions from beef cows for the scenario.
- Returns:
N2O emissions from beef cows in kilotonnes (kt).
- Return type:
float
- get_beef_cows_co2e_emission()
Calculate the total CO2e (CO2 equivalent) emissions from beef cows for the scenario.
- Returns:
CO2e emissions from beef cows in kilotonnes (kt).
- Return type:
float
- get_total_co2_emission()
Calculate the total CO2 emissions from all livestock (dairy and beef) for the scenario.
- Returns:
Total CO2 emissions in kilotonnes (kt).
- Return type:
float
- get_total_ch4_emission()
Calculate the total CH4 emissions from all livestock (dairy and beef) for the scenario.
- Returns:
Total CH4 emissions in kilotonnes (kt).
- Return type:
float
- get_total_n2o_emission()
Calculate the total N2O emissions from all livestock (dairy and beef) for the scenario.
- Returns:
Total N2O emissions in kilotonnes (kt).
- Return type:
float
- get_total_co2e_emission()
Calculate the total CO2e (CO2 equivalent) emissions from all livestock (dairy and beef) for the scenario.
- Returns:
Total CO2e emissions in kilotonnes (kt).
- Return type:
float
- get_dairy_cows_area()
Calculate the total land area required for dairy cows, using the area scaler and scaled population.
- Returns:
Land area for dairy cows in hectares (ha).
- Return type:
float
- get_beef_cows_area()
Calculate the total land area required for beef cows, including both beef and dairy+beef systems.
- Returns:
Land area for beef cows in hectares (ha).
- Return type:
float
- get_total_area()
Calculate the total land area required for all livestock (dairy and beef).
- Returns:
Total land area in hectares (ha).
- Return type:
float
- get_total_beef_protein()
Calculate the total protein production from beef and dairy+beef systems for the scenario.
- Returns:
Total beef protein production in kilograms (kg).
- Return type:
float
- get_total_milk_protein()
Calculate the total milk protein production from dairy cows for the scenario.
- Returns:
Total milk protein production in kilograms (kg).
- Return type:
float
- get_hnv_area()
Calculate the area of high nature value (HNV) grassland managed by beef cows, including both beef and dairy+beef systems.
- Returns:
HNV area in hectares (ha).
- Return type:
float