GreenDelta / olca-app

Source code of openLCA
openlca.org
Mozilla Public License 2.0
183 stars 41 forks source link

Bug when Using the "Avoided Product" flag in a process #354

Closed urichmd-airproducts closed 7 months ago

urichmd-airproducts commented 9 months ago

openLCABugs_TestCases.zip

In the attached database, I created two product systems which used to give the same result in openLCA1, but now give different results in openLCA2.

My model is as follows:

  1. The starting database is publically available from the Canadian gov't: https://www.canada.ca/en/environment-climate-change/services/managing-pollution/fuel-life-cycle-assessment-model.html. However, I don't think this contributes to the issue I'm having.
  2. The product system called "Case A" models a chemical production process which produces a "main product" and an "avoided product" by consuming natural gas and power. The avoided product is marked as such, and its provider is another process which I include in the attached file.
  3. The product system called "Case B" is a manual calculation I do via parameters which duplicated the product system calculation result in Case A when I used openLCA1.
  4. The project item compares the two product systems.

To "reproduce" my issue, please re-run the project item's calculation. Then note the product systems give different answers. My current suspicion is something going wrong with the avoided product calculation in openLCA2. Any help would be appreciated.

Thanks.

msrocka commented 9 months ago

Thanks, but for your example, I get the same results in openLCA 1. I converted your example to version 1 using backto1; the json package is attached; only in the project editor you need to re-add the systems for comparison.

openLCABugs_TestCases_backto1.zip

urichmd-airproducts commented 7 months ago

@msrocka Thank you for your response - I apologize that I didn't see your response until now. I'll have to go back and look at my previous models. Thanks again.