LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
146 stars 57 forks source link

Using a parameter in the formula of a product/reference flow causes the results in a Scenario LCA to have a flipped sign #839

Closed WSGrul closed 1 year ago

WSGrul commented 2 years ago

When I used a parameter in the formula for my reference flows, the results were flipped in the Scenario LCA. In a Standard LCA they had the correct sign. In the example, I used the parameter 'lifespan' with three different positive values. One alternative I gave a negative formula and the other a positive to demonstrate. The amounts of the results are still the same. 'Steel formula:' afbeelding 'Timber formula:' afbeelding 'Results in Standard LCA, steel negative as expected:' afbeelding 'Results in Scenario LCA, signs are flipped:' afbeelding

bsteubing commented 2 years ago

@WSGrul thanks for reporting this issue. Seems like when using scenario values for parameters, then the values are entered as if they were "technosphere" values and not "production" values (sign change needed)

Zoophobus commented 2 years ago

@WSGrul

Hi, I was hoping you could check something for me. I have been investigating this problem from the master branch and have come across a problem with updating the scenario calculations. (Please forgive me if I am doing something that don't make sense)

This problem arises when I am clearing an equation for a single unit process in an LCA. In my case the corresponding scenario results are not updated to exclude the former (cleared) equation, instead I have to remove all of the equations. (The normal LCA analysis, however, is updated when clearing a single equation).

WSGrul commented 2 years ago

@Zoophobus Hi, If I understand correctly, in your case when you clear an equation in your scenario results the old equation is still used, and only updated when all equations are cleared? I have personally not noticed this issue in my instance, but I have noticed the scenarios don't always updated properly. In general clearing the scenario file and reuploading seemed to reload the scenarios, maybe that would also work for your issue?

WSGrul commented 2 years ago

@Zoophobus Hi, If I understand correctly, in your case when you clear an equation in your scenario results the old equation is still used, and only updated when all equations are cleared? I have personally not noticed this issue in my instance, but I have noticed the scenarios don't always updated properly. In general clearing the scenario file and reuploading seemed to reload the scenarios, maybe that would also work for your issue?

Zoophobus commented 2 years ago

@WSGrul Thanks! I've been looking at this issue for a couple of days now, but I'm still new so it's fairly slow progress at the moment. While I'm mainly focused on the switching of signs I've been coming across these other issues and was wanting more confirmation. Unfortunately we've been having this and even more issues arising in a prospective LCA class.

marc-vdm commented 1 year ago

Closing this as resolved in #1025