0 votes
463 views
We are interested in using the OLCA API with openLCA 2.0. Is there a function built into the API for calling results that re-creates the "contribution tree" tab you get when performing calculations in OpenLCA?
in openLCA by (220 points)

1 Answer

0 votes
by (13.7k points)
Yes, the Python IPC API has a `upstream_tee` module that provides this functionality. You can have a look in this test case how it can be used: https://github.com/GreenDelta/olca-ipc.py/blob/master/tests/test_upstream_tree.py
by (630 points)
Does this approach only work with specific elementary/intervention flows as EnviFlow objects?

I am more interested in the contribution of each product system level (i.e. the respective processes) to impact categories, such as GWP100.

Using "olca_ipc.upstream_tree.UpstreamTree" without an environment flow fails.

Another approach is to use the olca_ipc.Result method "get_upstream_impacts_of()", which requires list of TechFlow objects. However, the "concatenation" of the TechFlow objects seems a bit tedious.

Am I missing something? Will there be some additional functionality in the future?
...