MOCA - Uncertainty Quantification for Life Cycle Assessment
Project description
MOCA - Uncertainty Quantification for Life Cycle Assessment
MOCA is a Python package to perform efficient and parallelised uncertainty quantification for Life Cycle Assessment (LCA). It is built to work with the Brightway2 framework. Currently, MOCA includes a class for high-speed Monte Carlo Simulation. More methodologies for uncertainty quantification are planned to be implemented going forward.
This package has been developed by the German Aerospace Center (DLR e.V.), at the Institute of Maintenance, Repair and Overhaul.
Installation
Simply install this package via pip using:
pip install moca-uncertainty-lca
How to use
You can find a very simple usage example below. For more information regarding customisation options and how MOCA could be integrated into your existing code framework, please feel free to visit our documentation.
import moca_uncertainty_lca as moca
import brightway2 as bw
# setting up Brightway
bw.projects.set_current("your project")
# specify the LCIA method / characterisation model
method = ('EF v3.1','climate change','global warming potential (GWP100)')
# build the demand dictionary for the Monte Carlo LCA
demand = {bw.Database("your_database").get("your_code"): 1}
# initialize and execute the Monte Carlo LCA
mc_lca = moca.MonteCarloLCA(demand, method)
mc_lca.execute_monte_carlo(iterations=100)
# retrieve the results and write them to files
mc_results = mc_lca.mc_results
mc_lca.results_to_json()
mc_lca.stats_to_json()
Documentation
Find more detailed documentation here!
Why use MOCA rather than built-in Brightway2 options?
There are two main reasons:
-
MOCA is faster! Depending on the complexity and size of your calculation setup, the speed-up can range from twice as fast to more than 40 times as fast.
-
MOCA is easy to use and comes with built-in functions to make your life easier, such as automatic formatting and exporting.
License
MOCA is licensed with the BSD 3-Clause. For more information, see here.
Contributing
Contributions are very welcome! If you’d like to help, here’s how you can get started:
- Report bugs or request features: Open an issue and describe the problem or idea as clearly as possible (what you expected, what happened, steps to reproduce, versions, etc.)
- Improve the code or documentation
- Open an issue or find one that you want to work on
- Fork the repository, create a feature branch, and write your code
- Ideally: Add tests for new features
- Format code with Black
- Create a pull request and reference any related issues
- Discussion and questions: If you’re not sure whether your idea fits the project, feel free to open an issue and ask before you start coding
Support
Please feel free to create an issue on Github or to contact Maria Höller (maria.hoeller@dlr.de) for support.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file moca_uncertainty_lca-1.0.1.tar.gz.
File metadata
- Download URL: moca_uncertainty_lca-1.0.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f60cb6ce9b15179042e3bb9e7d20d7620b92b6b74411b70d20d5960027eb0457
|
|
| MD5 |
ee45e12c62c36ef55579f5832a0bdae5
|
|
| BLAKE2b-256 |
5bddd1cc436a16481f31f6f121ab7b00f3105a6ae0ffc51d4a47a956afb741c3
|
File details
Details for the file moca_uncertainty_lca-1.0.1-py3-none-any.whl.
File metadata
- Download URL: moca_uncertainty_lca-1.0.1-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60ab295f376bdb15b69c3852e5be902ba2e612d527a66054aa15916d7292365a
|
|
| MD5 |
a7cba01978a4547f2843f7c44eb8ced6
|
|
| BLAKE2b-256 |
ff02c880d3d022d596ffbccb491ee590f83104b2628779eabfd3690c6598c609
|