This is a python package for Life Cycle Optimization (LCO) based on life cycle inventories. pulpo is intended to serve as a platform for optimization tasks of varying complexity.
The package builds on top of the Brightway LCA framework as well as the optimization modeling framework Pyomo.
Applying optimization is recommended when the system of study has (1) many degrees of freedoms which would prompt the manual assessment of a manifold of scenarios, although only the "optimal" one is of interest and/or (2) any of the following capabilities makes sense within the goal and scope of the study:
- Specify technology and regional choices throughout the entire supply chain (i.e. fore- and background), such as choices for the production technology of electricity or origin of metal resources. Consistently accounting for changes in the background in "large scale" decisions can be significant.
 - Specify constraints on any activity in the life cycle inventories, which can be interpreted as tangible limitations such as raw material availability, production capacity, or environmental regulations.
 - Optimize for or constrain any impact category for which the characterization factors are available.
 - Specify supply values instead of final demands, which can become relevant if only production values are available (e.g. here).
 
The following features are currently under development:
ℹ️ Optimization under uncertainty [chance-constraints, stochastic optimization ...]ℹ️ Multi-objective optimization [bi-objective epsilon constrained, goal programming ...]ℹ️ Integration of economic and social indicators in the optimization problem formulation
ℹ️ 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/
Feature requests are more than welcome!
PULPO has been deployed to the pypi index. Depending on the version of brightway projects you want to work on, install either the bw2 or bw25 version via:
pip install "pulpo-dev[bw2]"or
pip install "pulpo-dev[bw25]"Use this link to start a session and test PULPO
here is a simple showcase revolving around methanol production with by-products and uncertainty treatment.
Find further example notebooks for a hydrogen case, an electricity case, and a plastic case here.
There is also a workshop repository (here), which has been created for the Brightcon 2024 conference. It contains several notebooks that guide you through the PULPO package and its functionalities, as well as an exercise.
Calling from the package folder:
python -m unittest discover -s tests- 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 the 
1e20(and1e24) as infinite in some cases. Check out in section 8 of the new showcase how to use these limits. Setting them lower may also improve convergence speed in some cases. - Enable dependent constraint definition. Check out in section 9 of the new showcase how to use these these.
 
- Enable the use of gurobi solver
 
- Enable the use of NEOS solver (commercial solvers without license)
 - Enable Monte-Carlo sampling feature
 - Retrieve uncertainty information to 
lci_datafor future use 
- Switch packaging logic from setup.py to pyproject.toml and align pypi with Github versioning number
 
Contributions are very welcome. If you would like to request a feature or report a bug please open an Issue. If you are confident in your coding skills don't hesitate to implement your suggestions and send a Pull Request.
This project is licensed under the ℹ️  BSD 3-Clause License. See the LICENSE file for additional info.
Copyright (c) 2025, Fabian Lechtenberg. All rights reserved.
We would like to express our gratitude to the authors and contributors of the following main packages that PULPO is based on:
In addition, we acknowledge the pioneering ideas and contributions from the following works:
Follow-up work, incorporating features such as top-down matrix construction for the use of entire life cycle inventory databases and supply specification, was implemented in PULPO and 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
This article is to be cited / referred to if PULPO is used to derive results of a publication or project.
