英文:
Accounting for parameter change in LCIA
问题
我在brightway过程中已对交换进行参数化。
我想查看参数的变化如何影响LCA结果。
我可以看到更新参数后,我的交换中的“amount”条目已被修改。
但是,“redo_lci(a)”似乎没有注意到交换数量的变化。
是否有一种有效的方法可以重新执行LCIA,同时重新计算最小数量的元素?
具体来说:
- 如果我只修改与生物圈的交换,我认为不需要重新计算需求和清单
- 如果我只修改技术层面的交换,我认为不需要重新计算生物圈矩阵
- 如果我同时修改两者,那么我猜我只需重新计算一切,无论如何,所以我应该从头开始重新执行LCA
这是否正确,是否有一种方法可以避免在brightway中进行不必要的计算?
顺便说一下,brightway是否应该检测到参数更改使LCA过时,并在调用“redo_lci(a)”时发出警告?
英文:
I have parametrized exchanges in a brightway process.
I want to see how changes in the parameters change the results of the LCA.
I can see that updating the parameters worked as the amount entry in my exchanges are modified.
However, redo_lci(a) do not seem to notice the change in the exchanges' amounts.
Is there an efficient way to redo the LCIA while recomputing the minimal amount of elements?
Namely:
- if I only modify exchanges with the biosphere, I think I don't need to recompute the demand and inventory
- if I only modify technosphere exchanges, I think I don't need to recalculate the biosphere matrix
- if I modify both, then I guess I just have to recompute everything, anyway, so I should redo the LCA from scratch
Is this correct, and would there be a way avoiding unnecessary calculations in brightway?
Incidentally, shouldn't brightway detect that parameter changes make the LCA outdated and warn about it when calling redo_lci(a)?
答案1
得分: 1
这是一个很好的问题,反映了当前关于参数化的文档非常有限。这是我的错,抱歉!
在处理数据管理、包括公式和变量的库与LCA计算之间存在很大的分歧。LCA计算库(bw2calc)不知道您已更改参数值,除了每次创建一个新的LCA对象之外,没有简单的方法来更改参数值并使其反映在LCA矩阵中。
然而,有一个专门为这种用例设计的附加库:presamples。它有很好的文档,应该能够解决这个问题。
英文:
This is an excellent question, and reflects the poor documentation currently available for parameterization. My fault, sorry!
There is a strong divide between the library that does the data management, including formulas and variables, and the LCA calculations. The LCA calculation library (bw2calc) has no idea that you have changed parameter values, and there is no easy way to change a parameter value and have that reflected in the LCA matrices other than creating a new LCA object each time.
However, there is an add-on library which was designed for exactly this use case: presamples. It is well documented and should work.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论