0

在 Brightway 中是否可以定义与不同单位交换的活动?(例如太焦耳而不是兆焦耳)。我写了一些代码来测试这个,我的幼稚方法似乎不起作用:

co2_f=[f for f in bw.Database('biosphere3')
if 'Carbon dioxide' in f['name']
and ' fossil' in f['name']
and f['categories']==('air', 'low population density, long-term')
][0]
co2_f

for act in bw.Database('ei_35cutoff'):
    if act['unit']=='megajoule':
       break

db = bw.Database("a&e")

db.write({
("a&e", "cat1"): 
    {
    'name': 'cat1',
    'unit': 'kilogram',
    'exchanges': [
        {'input': act.key  ,'amount': 10,'type': 'technosphere','unit':'megajoule'},
        {'input': co2_f.key,'amount': 1,'type': 'biosphere','unit':'kilogram'}]
    },

("a&e", "cat2"): 
    {
    'name': 'cat2',
    'unit': 'kilogram',
    'exchanges': [
        {'input': act.key  ,'amount': 10,'type': 'technosphere','unit':'terajoule'},
        {'input': co2_f.key,'amount': 1,'type': 'biosphere','unit':'kilogram'}]
    },
("a&e", "cat3"): 
    {
    'name': 'cat3',
    'unit': 'kilogram',
    'exchanges': [
        {'input': act.key  ,'amount': 10,'type': 'technosphere','unit':'megajoule'},
        {'input': co2_f.key,'amount': 1,'type': 'biosphere','unit':'ton'}]
    },
})

ipcc2013 = ('IPCC 2013', 'climate change', 'GWP 100a')

for a in db:
    actlca=bw.LCA({a:1},method=ipcc2013)
    actlca.lci()
    actlca.lcia()
    print(a['name'],actlca.score)

并且都产生相同的结果。好像二氧化碳是公斤和act兆焦耳。

4

1 回答 1

0

如果您的意思是“Brightway2 是否根据 'units' 属性缩放交换”,答案是否定的。

就像 Brightway2 中的几乎所有其他东西一样,这并非不可能。但是,单位不是processedBrightway 存储的数据的一部分(即,它不是存储的结构化数组的一部分,MatrixBuilders 从中构建AB矩阵)。

有关已处理数据和构建矩阵的更多信息,请参见此处此处

于 2019-07-08T13:37:06.210 回答