I am trying to run a simple montecarlo analysis with brightway, but I am having some trouble to understand the procedure. The getting started notebook had an example, but I think is outdated (the iterate method I think has been changed). There are some notes on the seminar about how to optimise time but it is not very clear what a conventional way of running a montecarlo analysis for a single activity (or a comparative one).
I kind of understood the MultiMonteCarlo method e.g,
act_dict_list=[{bw.Database('ei_34con').random():1},
{bw.Database('ei_34con').random():1},
{bw.Database('ei_34con').random():1},
{bw.Database('ei_34con').random():1},
{bw.Database('ei_34con').random():1}]
mmc=bw.MultiMonteCarlo(act_dict_list,method=ipcc2013,iterations=10)
mmc.calculate()
but for some reason all results are equal for the same activity and simpler methods are probably more appropriate for a simple calculation.
[EDIT]: this was due to a bug that is now solved, the MultiMonteCarlo now works well.
a simple analysis can be done quite quickly (response based on this):
random_activity=bw.Database('ei_34cutoff').random()
random_method=bw.methods.random()
MC_random_activity=bw.MonteCarloLCA({random_activity:1},random_method)
%time MC_random_act_scores = [next(MC_random_activity) for _ in range(100)]
A multiple montecarlo can be done using the approach of the answer, that right now does not have any bug