bw2calc.method_config#
Classes#
A class that stores the logical relationships between impact categories, normalization, and |
Module Contents#
- class bw2calc.method_config.MethodConfig[source]#
Bases:
pydantic.BaseModel
A class that stores the logical relationships between impact categories, normalization, and weighting.
The basic object in all three categories is an identifying tuple, i.e. tuples of strings. These tuples have no length restrictions.
impact_categories is a list of tuples which identify each impact category (bw2data.Method).
normalizations link normalization factors to impact categories. They are optional. If provided, they take the form of a dictionary, with keys of tuples which identify each normalization (bw2data.Normalization), and values of lists of impact categories tuples.
If normalizations is defined, all impact categories must have a normalization.
weightings link weighting factors to either normalizations or impact categories. They are optional. If provided, they take the form of a dictionary, with keys of tuples which identify each weighting (bw2data.Weighting), and values of lists of normalizations or impact categories tuples. They keys identify the weighting data, and the values refer to either impact categories or normalizations - mixing impact categories and normalizations is not allowed.
If normalizations is defined, all impact categories or normalizations must have a weighting.
The identifying tuples for impact_categories, normalizations, and weightings must all be unique.
Example
- âimpact_categoriesâ: [
(âclimate changeâ, â100 yearsâ), (âclimate changeâ, â20 yearsâ), (âeutrophicationâ,),
], ânormalizationsâ: {
- (âclimate changeâ, âglobal normalizationâ): [
(âclimate changeâ, â100 yearsâ), (âclimate changeâ, â20 yearsâ),
], (âeut european referenceâ, â1990â): [
(âeutrophicationâ,),
]
}, âweightingsâ: {
- (âclimate changeâ, âbadâ): [
(âhow bad?â, âdeadâ, âpeopleâ)
], (âeutrophicationâ, âalso badâ): [
(âhow bad?â, âdeadâ, âfishâ)
]
}
}#