bw_hestia_bridge.strategies.linking
Attributes
Functions
|
|
|
|
|
Link across two cycles using the graph_element attribute. |
|
|
|
|
|
Try to find a provider of the supplied demand. |
|
Module Contents
- bw_hestia_bridge.strategies.linking.link_across_cycles(data: list) list[source]
Link across two cycles using the graph_element attribute.
In this product:
‘name’: ‘Pig, piglet’, ‘term_type’: ‘liveAnimal’, ‘term_id’: ‘pigPiglet’, ‘type’: ‘product’, ‘cycle_id’: ‘baca63dqlc6n’, ‘graph_element’: {
}
}
We have a product (Pig, piglet) being produced by cycle baca63dqlc6n and used by cycle 5-qkgrlriqqm.
Here is the corresponding production exchanges in baca63dqlc6n:
“type”: “production”, “name”: “Pig, piglet”, “term_type”: “liveAnimal”, “term_id”: “pigPiglet”, “unit”: “number”, “amount”: 1, “transformation_id”: null
}
And the consuming exchange in 5-qkgrlriqqm:
“name”: “Pig, piglet”, “cycle_id”: “5-qkgrlriqqm”, “term_type”: “liveAnimal”, “term_id”: “pigPiglet”, “unit”: “number”, “amount”: 1.026, “group”: “Pig, piglet-0”, “type”: “technosphere”
}
We normally only allow linking within one cycle, but in this case we need to link across cycles.
- bw_hestia_bridge.strategies.linking.link_ecoinvent_biosphere(data: list, biosphere_label: str | None = 'biosphere3') list[source]
- bw_hestia_bridge.strategies.linking.link_ecoinvent_technosphere(data: list, ecoinvent_database_label: str) list[source]
- bw_hestia_bridge.strategies.linking.pick_from_overlapping(exc: dict, possibles: collections.defaultdict, overlapping: list) None[source]
Try to find a provider of the supplied demand.
exc is a dictionary; we use term_id (e.g. manureSaltsKgK2O) to search in possibles.
possibles is a dictionary with keys of Hestia term @id keys, and values of bw2data processes which were mapped against the Hestia term ids in “ecoinvent_mappings_technosphere.csv”.
overlapping is an ordered list, from smallest to largest, or each region in ecoinvent which completely overlaps the exc dataset’s location.
We try to find the process in the correct possibles value list which most closely matches the exc dataset location. We also use fallback locations if necessary. The fallback locations are RoE (rest of Europe), RoW (rest of world), and GLO (global).
If a match is found, adds input to the exc.