Skip to content

aeromaps.models.impacts.generic_energy_model.bottom_up.abatement_effective

Module to compute effective carbon abatement for each energy pathway.

EnergyAbatementEffective

EnergyAbatementEffective(name, pathway_name, *args, **kwargs)

Bases: AeroMAPSModel

This class computes the effective carbon abatement (i.e CO2 "avoided" by an option) for a given pathway.

Parameters:

Name Type Description Default
name str

Name of the model instance ('f"{pathway_name}_abatement_effective"' by default).

required
pathway_name str

Name of the energy pathway for which to compute the effective abatement.

required

Attributes:

Name Type Description
input_names dict

Dictionary of input variable names populated at model initialisation before MDA chain creation.

output_names dict

Dictionary of output variable names populated at model initialisation before MDA chain creation.

Source code in aeromaps/models/impacts/generic_energy_model/bottom_up/abatement_effective.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
def __init__(self, name, pathway_name, *args, **kwargs):
    super().__init__(
        name=name,
        model_type="custom",
        *args,
        **kwargs,
    )
    self.pathway_name = pathway_name

    # Inputs needed: discounted costs, unitary emissions, discounted emissions
    self.input_names = {
        f"{self.pathway_name}_energy_consumption": pd.Series([0.0]),
        f"{self.pathway_name}_mean_co2_emission_factor": pd.Series([0.0]),
        "cac_reference_co2_emission_factor": pd.Series([0.0]),
    }

    # Outputs: effective abatement volume (unit: tCO2)
    self.output_names = {
        f"{self.pathway_name}_abatement_effective": pd.Series([0.0]),
    }

compute

compute(input_data)

Compute the abatement effective due to the pathway.

Parameters:

Name Type Description Default
input_data

Dictionary containing all input data required for the computation, completed at model instantiation with information from yaml files and outputs of other models.

required

Returns:

Type Description
output_data

Dictionary containing all output data resulting from the computation. Contains outputs defined during model instantiation.

Source code in aeromaps/models/impacts/generic_energy_model/bottom_up/abatement_effective.py
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
def compute(self, input_data) -> dict:
    """
    Compute the abatement effective due to the pathway.

    Parameters
    ----------
    input_data
        Dictionary containing all input data required for the computation, completed at model instantiation with information from yaml files and outputs of other models.

    Returns
    -------
    output_data
        Dictionary containing all output data resulting from the computation. Contains outputs defined during model instantiation.
    """
    avoided_emission_factor = (
        input_data["cac_reference_co2_emission_factor"]
        - input_data[f"{self.pathway_name}_mean_co2_emission_factor"]
    )
    abatement_effective = (
        input_data[f"{self.pathway_name}_energy_consumption"]
        * avoided_emission_factor
        / 1000000
    )  # Convert to tCO2
    output_data = {f"{self.pathway_name}_abatement_effective": abatement_effective}

    self._store_outputs(output_data)
    return output_data