I try to run a Monte Carlo analysis with uncertainty on characterization factor. The code is running well (no error) but the results for each iteration are always the same. Calculation works with just LCA simulation.
Here is the code:
Definition of a sample LCIA method
some_exchange = bw.Database('biosphere3').random()
my_cf = [(some_exchange.key,
{"amount": 10,
"uncertainty_type": 4,
"minimum": 0,
"maximum": 20}
)]
uncertain_method = bw.Method(("fake", "method", "with uncertainty"))
uncertain_method.write(my_cf)
Definition of an simple activity
simple_LCI_db = bw.Database('simple LCI db')
simple_LCI_db.write(
{('simple LCI db', 'some_code'):
{'name': 'fake activity',
'unit': 'amount',
'exchanges':
[
{'input': ('simple LCI db', 'some_code'),
'amount': 1,
'type': 'production'},
{'input': some_exchange.key,
'amount': 1,
'type': 'biosphere'},
]
},
})
Monte Carlo code
mc = bw.MonteCarloLCA({('simple LCI db', 'some_code'):1}, ('fake', 'method', 'with uncertainty'))
next(mc)
Is there something wrong with the uncertainty definition?
Thank for your help!