brightway-lca / brightway-book

📖🌿 Interactive jupyter-book Documentation for Brightway
https://learn.brightway.dev
BSD 3-Clause "New" or "Revised" License
14 stars 5 forks source link

MonteCarlo #47

Open GiuliaCavenago93 opened 5 months ago

GiuliaCavenago93 commented 5 months ago

Thank you for this precious Online Book. In section 9 of BW25 for Beginners, I have issues running the code I copy below.

I think the problem is that in "brightway2" package there is the attribute "MonteCarloLCA", but I cannot find this attribute in any of the brightway 2.5 packages (bw2data,bw2io,bw2calc,bw2analyzer). Since I do not want to install brightway2 in the same environment in which I have installed brightway 2.5 (that as I have understood is a good choice, but I am new into brightway so I might be wrong) I was wondering if the attribute MonteCarloLCA is already somewhere also in brightway 2.5 code and I don't find it.

Thank you very much Giulia

CODE:

MC simulation with 10 iterations for our banana production and the IPCC GWP100a method

mc = bw.MonteCarloLCA({bananaCO:1}, ('IPCC 2013', 'climate change', 'GWP 100a')) scores = [next(mc) for in range(10)] scores