pulpo
A Python-based optimization tool for life cycle assessment (LCA) that aims to import, optimize, solve, retrieve, save, and summarize LCA results.
https://github.com/flechtenberg/pulpo
Category: Industrial Ecology
Sub Category: Life Cycle Assessment
Keywords
brightway ecoinvent lca lifecycle optimization pyomo
Last synced: about 3 hours ago
JSON representation
Repository metadata
Python package for life cycle optimization
- Host: GitHub
- URL: https://github.com/flechtenberg/pulpo
- Owner: flechtenberg
- License: bsd-3-clause
- Created: 2023-09-12T14:30:05.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2026-06-02T14:06:13.000Z (about 1 month ago)
- Last Synced: 2026-06-21T15:03:54.656Z (15 days ago)
- Topics: brightway, ecoinvent, lca, lifecycle, optimization, pyomo
- Language: Python
- Homepage: https://flechtenberg.github.io/pulpo/
- Size: 31.4 MB
- Stars: 35
- Watchers: 2
- Forks: 7
- Open Issues: 6
- Releases: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
README.md
📍 Overview
PULPO is a Python package for Life Cycle Optimization (LCO) based on life cycle inventories. It is designed to serve as a platform for optimization tasks of varying complexity.
The package builds on top of the Brightway LCA framework and the Pyomo optimization modeling framework.
✨ Capabilities
Applying optimization is recommended when the system of study has (1) many degrees of freedom that would otherwise prompt the manual assessment of a large number of scenarios, or (2) any of the following capabilities is relevant to the goal and scope of the study:
- Specify technology and regional choices throughout the entire supply chain (fore- and background), such as the production technology of electricity or the origin of metal resources. Consistently accounting for background changes in large-scale decisions can be significant.
- Specify constraints on any activity in the life cycle inventories, interpreted as tangible limitations such as raw material availability, production capacity, or environmental regulations.
- Optimize for or constrain any impact category for which characterization factors are available.
- Specify supply values instead of final demands, which is relevant when only production volumes are known (e.g. here).
- Optimize under uncertainty via a dedicated pipeline: import and filter uncertain LCI parameters, apply uncertainty strategies, run Global Sensitivity Analysis (Sobol), perform Monte Carlo sampling, or solve Chance-Constrained programs to obtain Pareto-optimal solutions at user-defined probability levels.
Features recently completed:
ℹ️ Optimization under uncertainty [chance-constraints, Monte Carlo, global sensitivity analysis]ℹ️ Development of a GUI for simple optimization tasksLinkℹ️ Enable PULPO to work on both bw2 and bw25 projectsℹ️ Thorough documentation hosted on flechtenberg.github.io/pulpo/
Features currently under development:
ℹ️ Multi-objective optimization [bi-objective epsilon constrained, goal programming ...]ℹ️ Integration of economic and social indicators in the optimization problem formulation
Feature requests are more than welcome!
🔧 Installation
PULPO is available on PyPI. Depending on the version of Brightway you want to work with, install either the bw2 or bw25 variant:
pip install "pulpo-dev[bw2]"
or
pip install "pulpo-dev[bw25]"
🤖 Running PULPO
Use this link to start a cloud session and test PULPO right away:
The main reference is the PULPO showcase notebook, which revolves around methanol production and covers both the core optimization features (Sections 1–9) and the full workflow of the pulpo_unc module (Section 10): uncertainty data import and filtering, gap-filling strategies, Monte Carlo from prepared distributions, Chance-Constrained optimization, and Global Sensitivity Analysis.
Additional example notebooks are available for a hydrogen case, an electricity case, and a plastic case.
There is also a workshop repository (here) created for the Brightcon 2024 conference, with guided notebooks and exercises.
🧪 Tests
Run from the package folder:
python -m unittest discover -s tests
What's new in 1.5.1?
- Hotfix for chance-constrained uncertainty workflow: corrected environmental-cost mean computation in
pulpo.utils.uncertainty.ccby replacing fragile pandas sparse updates with direct sparse-matrix updates and multiplication. - Updated Section 10 of the main showcase to include the deterministic reference result used by
run_gsa, and re-ran the workflow end-to-end. - Moved the sample and rice-husk database helpers into a new
pulpo.datasetssubpackage so thatpulpo.install_sample_db()andpulpo.install_rice_husk_db()work from an installed wheel. - Packaging fixes:
tests/is no longer included in the wheel, and thebw2/bw25extras are now declared as mutually exclusive in[tool.uv] conflictsso thatuvcan resolve the lockfile cleanly.
What's new in 1.5.0?
This release integrates the full uncertainty analysis pipeline into PULPO via the new pulpo.pulpo_unc module, turning the long-running development effort into a first-class feature:
PulpoOptimizerUnc— A subclass ofPulpoOptimizerthat exposes the entire uncertainty workflow through a single worker object.- Uncertainty data import and filtering — Import uncertain parameters directly from Brightway databases via
import_and_filter_uncertainty_data(), with configurable cutoff-based filtering. - Uncertainty strategies — Fill missing or incomplete uncertainty specifications using
apply_uncertainty_strategies(), with built-in strategies (e.g. triangular bound interpolation) and support for custom expert-knowledge distributions. - Monte Carlo from prepared distributions — Run MC on the curated uncertainty data (without re-sampling the full Brightway matrices) via
run_mc_from_uncertainty(). - Chance-Constrained (CC) optimization — Formulate and solve chance-constrained programs with
create_CC_formulation()andsolve_CC_problem(), yielding a Pareto front of optimal solutions at varying probability (risk) levels. - Global Sensitivity Analysis (GSA) — Identify the uncertain parameters that drive optimization outcomes using Sobol sensitivity indices via
run_gsa(). - End-to-end showcase — Section 10 of the PULPO showcase notebook walks through the complete
pulpo_uncworkflow on the methanol system. - Note: The uncertainty features in this release have been implemented and tested with Brightway
bw2only; users working withbw25should validate workflows and may need to adapt configuration. - Minor bugfixes and code cleanup.
What's new in 1.4.3?
- Allow users to pass lower inventory flow and lower impact limits via
lower_inv_limitandlower_imp_limitdicts. - Provide new showcase notebook.
- Enable users to pass custom default upper limits on elements, given that Gurobi identified
1e20(and1e24) as infinite in some cases. See section 8 of the showcase for usage. Setting them lower may also improve convergence speed. - Enable dependent constraint definition. See section 9 of the showcase for usage.
What's new in 1.4.2?
- Enable the use of Gurobi solver.
What's new in 1.4.0?
- Enable the use of NEOS solver (commercial solvers without a local license).
- Enable Monte Carlo sampling feature.
- Retrieve uncertainty information to
lci_datafor future use.
What's new in 1.3.0?
- Switch packaging logic from
setup.pytopyproject.tomland align PyPI with GitHub versioning.
🤝 Contributing
Contributions are very welcome. To request a feature or report a bug, please open an Issue. If you are confident in your coding skills, feel free to implement your suggestions and send a Pull Request.
📄 License
This project is licensed under the ℹ️ BSD 3-Clause License. See the LICENSE file for additional info.
Copyright (c) 2026, Fabian Lechtenberg. All rights reserved.
👏 Acknowledgments
We would like to express our gratitude to the authors and contributors of the following packages that PULPO builds upon:
We also acknowledge the pioneering ideas and contributions from the following works:
The development of PULPO culminated in the following publication, which details the approach and outlines its implementation:
Fabian Lechtenberg, Robert Istrate, Victor Tulus, Antonio Espuña, Moisès Graells, and Gonzalo Guillén‐Gosálbez.
“PULPO: A Framework for Efficient Integration of Life Cycle Inventory Models into Life Cycle Product Optimization.”
Journal of Industrial Ecology, October 10, 2024.
https://doi.org/10.1111/jiec.13561
Please cite this article if PULPO is used to produce results for a publication or project.
Authors
- @flechtenberg
- @robyistrate
- @vtulus
- Bartolomeus Haeussling Loewgren
Owner metadata
- Name: Fabian Lechtenberg
- Login: flechtenberg
- Email:
- Kind: user
- Description:
- Website:
- Location: Barcelona
- Twitter:
- Company: Universitat Politècnica de Catalunya
- Icon url: https://avatars.githubusercontent.com/u/67694245?u=fe33f5029f1012462fa7ec7729ef6553a2505bcf&v=4
- Repositories: 1
- Last ynced at: 2023-10-05T13:38:58.535Z
- Profile URL: https://github.com/flechtenberg
GitHub Events
Total
- Delete event: 17
- Member event: 1
- Pull request event: 17
- Fork event: 5
- Issues event: 12
- Watch event: 11
- Issue comment event: 6
- Push event: 69
- Create event: 20
Last Year
- Delete event: 1
- Watch event: 5
- Push event: 15
- Create event: 1
Committers metadata
Last synced: 3 days ago
Total Commits: 295
Total Committers: 3
Avg Commits per committer: 98.333
Development Distribution Score (DDS): 0.546
Commits in past year: 128
Committers in past year: 3
Avg Commits per committer in past year: 42.667
Development Distribution Score (DDS) in past year: 0.523
| Name | Commits | |
|---|---|---|
| Fabian Lechtenberg | f****g@u****u | 134 |
| flechtenberg | f****g@c****h | 86 |
| Bartolomeus Haeussling Loewgren | b****n@c****l | 75 |
Committer domains:
- cml.leidenuniv.nl: 1
- chem.ethz.ch: 1
- upc.edu: 1
Issue and Pull Request metadata
Last synced: 9 days ago
Total issues: 11
Total pull requests: 26
Average time to close issues: 27 days
Average time to close pull requests: 1 day
Total issue authors: 3
Total pull request authors: 1
Average comments per issue: 0.45
Average comments per pull request: 0.0
Merged pull request: 26
Bot issues: 0
Bot pull requests: 0
Past year issues: 11
Past year pull requests: 17
Past year average time to close issues: 27 days
Past year average time to close pull requests: 1 day
Past year issue authors: 3
Past year pull request authors: 1
Past year average comments per issue: 0.45
Past year average comments per pull request: 0.0
Past year merged pull request: 17
Past year bot issues: 0
Past year bot pull requests: 0
Top Issue Authors
- flechtenberg (9)
- Blowgren (1)
- jacopocipriani (1)
Top Pull Request Authors
- flechtenberg (29)
Top Issue Labels
- enhancement (4)
- bug (1)
Top Pull Request Labels
- enhancement (2)
Package metadata
- Total packages: 2
-
Total downloads:
- pypi: 70 last-month
- Total dependent packages: 0 (may contain duplicates)
- Total dependent repositories: 0 (may contain duplicates)
- Total versions: 24
- Total maintainers: 1
proxy.golang.org: github.com/flechtenberg/pulpo
- Homepage:
- Documentation: https://pkg.go.dev/github.com/flechtenberg/pulpo#section-documentation
- Licenses: bsd-3-clause
- Latest release: v1.5.1 (published 2 months ago)
- Last Synced: 2026-07-03T21:01:08.239Z (3 days ago)
- Versions: 9
- Dependent Packages: 0
- Dependent Repositories: 0
-
Rankings:
- Dependent packages count: 5.395%
- Average: 5.576%
- Dependent repos count: 5.758%
pypi.org: pulpo-dev
Pulpo package for optimization in LCI databases
- Homepage:
- Documentation: https://pulpo-dev.readthedocs.io/
- Licenses: bsd-3-clause
- Latest release: 1.4.3 (published 9 months ago)
- Last Synced: 2026-04-01T09:58:13.220Z (3 months ago)
- Versions: 15
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 70 Last month
-
Rankings:
- Dependent packages count: 7.303%
- Forks count: 29.948%
- Average: 36.151%
- Stargazers count: 38.914%
- Dependent repos count: 68.439%
- Maintainers (1)
Score: 9.074864232413733