Skip to content

aeromaps.models.optimisation.constraints.carbon_budget_constraint

carbon_budget_constraint

This module contains the CarbonBudgetConstraint model, which defines and enforces the constraint on aviation's carbon budget consumption.

CarbonBudgetConstraint

CarbonBudgetConstraint(name='carbon_budget_constraint', *args, **kwargs)

Bases: AeroMAPSModel

This class computes the constraint on aviation's carbon budget consumption.

Parameters:

Name Type Description Default
name str

Name of the model instance ('carbon_budget_constraint' by default).

'carbon_budget_constraint'
Source code in aeromaps/models/optimisation/constraints/carbon_budget_constraint.py
29
30
def __init__(self, name="carbon_budget_constraint", *args, **kwargs):
    super().__init__(name=name, *args, **kwargs)

compute

compute(gross_carbon_budget_2050, aviation_carbon_budget_objective, cumulative_co2_emissions)

Carbon budget consumption share calculation.

Parameters:

Name Type Description Default
gross_carbon_budget_2050 float

World gross carbon budget until 2050 [GtCO2].

required
aviation_carbon_budget_objective float

Constraint set as a share of gross carbon budget allocated to aviation [%].

required
cumulative_co2_emissions Series

Cumulative CO2 emissions from all commercial air transport [GtCO2].

required

Returns:

Type Description
aviation_carbon_budget_constraint

Constraint value indicating how close aviation is to its allocated carbon budget by 2050 [-].

Source code in aeromaps/models/optimisation/constraints/carbon_budget_constraint.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
def compute(
    self,
    gross_carbon_budget_2050: float,
    aviation_carbon_budget_objective: float,
    cumulative_co2_emissions: pd.Series,
) -> float:
    """
    Carbon budget consumption share calculation.

    Parameters
    ----------
    gross_carbon_budget_2050
        World gross carbon budget until 2050 [GtCO2].
    aviation_carbon_budget_objective
        Constraint set as a share of gross carbon budget allocated to aviation [%].
    cumulative_co2_emissions
        Cumulative CO2 emissions from all commercial air transport [GtCO2].

    Returns
    -------
    aviation_carbon_budget_constraint
        Constraint value indicating how close aviation is to its allocated carbon budget by 2050 [-].

    """
    cumulative_emissions = (
        cumulative_co2_emissions.loc[2050] - cumulative_co2_emissions.loc[2025]
    )
    adjusted_carbon_budget_2050 = (
        gross_carbon_budget_2050 * aviation_carbon_budget_objective / 100
        - cumulative_co2_emissions.loc[2025]
    )

    # avoid division by 0: if adjusted carbon budget is lower <= 0, impossible to decarbonise:
    # trigger infeasibility warning in the optimisation
    if adjusted_carbon_budget_2050 <= 0:
        logging.warning(
            "Adjusted carbon budget for aviation in 2050 is <= 0. "
            "This indicates that the cumulative emissions up to 2025 have already exceeded "
            "the allocated carbon budget for aviation. "
            "The optimisation problem may be infeasible."
        )
        adjusted_carbon_budget_2050 = 1e6  # small positive number

    aviation_carbon_budget_constraint = (
        +(cumulative_emissions - adjusted_carbon_budget_2050) / adjusted_carbon_budget_2050
    )

    self.float_outputs["aviation_carbon_budget_constraint"] = aviation_carbon_budget_constraint

    return aviation_carbon_budget_constraint