例如,同一“自来水市场,RoW”活动的多个输入在工业过程中用于不同目的。导入数据库时,这些输入的数量是否会自动汇总在一个“自来水市场,RoW”活动中?
谢谢!
[编辑]我添加了一个代码示例以更好地说明问题:
##the goal is to use a dict to categorize the inputs of the activity "market for tap water, RoW" by industrial classifications.
##For example, there could be 200+ upstream activities under the classification "3510b: Electric power generation, photovoltaic"
##using this particular tap water activity. Then the results will be "d['3510b...']=[1E-5, 2E-7,...].
#get tap water of interest
tap_water=db.search('tap water',filter={"location":"row"})[0]
#create a dict to store classifications
facet_store=defaultdict(list)
#find the upstream activities
for exc in tap_water.upstream():
temp_classification=exc.output["classifications"]
flat_classification_list=[el for tuuple in temp_classification for el in tuuple]
temp_locator=flat_classification_list.index("ISIC rev.4 ecoinvent") #keyword for location
key_classification=flat_classification_list[temp_locator+1] #actual classification is always immediately after this keyword
facet_store[key_classification].append(exc["amount"]) #append the input amount of tap water to each upstream activity to the list
问题是如果上游活动不止一次使用“自来水市场,RoW”怎么办。这是否意味着此上游活动将在 for 循环中多次显示为“exc”?