LCA-ActivityBrowser / activity-browser

GUI for brightway2
GNU Lesser General Public License v3.0
152 stars 58 forks source link

Scenario analysis: delete old "prepared scenarios", activate parameters in ab, and flexible linking of activities #391

Closed xiaoshir closed 4 years ago

xiaoshir commented 4 years ago

Hi, I noticed that after "load scenario table", I need to give this df a name. After doing it for a few times, the list of "prepared scenarios" gets expanded. Is there anyway to delete older names under this list if it is no longer in use? image

dgdekoning commented 4 years ago

Currently the only 'simple' way of removing older presamples packages is to go into the brightway project folder and remove the package from the presamples directory inside, which I will admit isn't really an easy way of getting rid of them.

A possible fix for this would be a window or button somewhere which allows you to select one or more packages to remove at once.

xiaoshir commented 4 years ago

Thanks for the prompt reply, as always.

I followed your advice, and tried to delete them in the brightway project folder, which was not too tedious. But the folder names there are long strings of codes rather than what is displaying here, so it was not easy to figure out which one is which.

In addition, I have got 2 other questions related to scenario analysis in ab:

  1. from the ab user perspective: is there anyway to "activate" the parameters in ab (by "activated" I mean what Chris wrote here)? (I managed this in brightway by running add_exchanges_to_group(group, activity), but for users who relies on ab only, this could stop them from using scenario analysis. Without running this, one gets this pop-up windown in ab, despite the fact that formula is used in exchanges already. They are just not "activated". image

  2. I find this paper Steubling 2016 et al. interesting, but don't know what is exactly the corresponding implementation in ab. For me, scenario analysis helps to assign different values to the same parameter to generate results for different scenarios. But this paper talks about a different "type" of scenario formation through flexible linking of activities with some kind of intermediate general activities (see Fig 1a in the paper), which I couldn't find corresponding functionality in ab.

dgdekoning commented 4 years ago

For number 1, you activate exchange and activity parameters by going into the specific activity (double clicking from the database list). You then start to 'edit' the activity (make sure the entire database is editable) by checking the 'edit' checkbox for the activity. It is only after editing the exchange formulas that AB actually starts activating all of the calculations for that specific activity. This is because some datasets (ecoinvent among them) have exchanges that start out with formulas that reference parameters that don't exist, which of course completely break calculations, so be prepared to mess around :D.

As to number 2, you are completely correct, the original Activity Browser was made to provide this functionality. This original version can be found here and I can't offer support for it. There has been some talk about re-adding this functionality to the newer version of the activity browser, but nothing in particular has been set in stone.

xiaoshir commented 4 years ago

Thanks for your response!