PyMLCA
Software for Generalized Matrix-based LCA and Reliability Based LCA
Shinsuke Sakai
Emeritus Professor, The University of Tokyo, Japan
Visiting Professor, Yokohama National University, Japan
Overview
This package provide the function for general-purpose matrix-based LCA analysis and LCA based on reliability design. Algorithm for sensitivity analysis using perturbation method is based on the theory shown by Sakai and Yokoyama[1]. Should any required packages be missing during execution, please install them accordingly.
Procedure
- Install this package using pip command.
- Create a folder to store inventory data. As an example, the folder named 'SandwichPackage' is already created.
- Save the inventory data to be analyzed in that folder.
- Import PyMLCA module using 'from MLCArel import PyMLCA as pm' command.
- Create an instance to manage the analysis using 'dp=pm.DesignProcess()' command.
- From here on, use the created instance to perform the intended analysis.
Operation check
The following describes the method for checking when using the inventory data in the SandwichPackage folder. Sample data for SandwichPackaged are provided in the site.
First, create an instance and define the inventory data folder.
from MLCArel import PyMLCA as pm
dp=pm.DesignProcess()
path='./SandwichPackage'
dp.SetDfFromPath(path)
Next, perform a matrix-based LCA.
solution,surplusFlow,loadValue=dp.SimpleAnalysis()
Confirm the created coefficient matrix.
print(dp.rbld.mlca.coefficientMat)
The expected output would be as follows.
| mat | production of aluminum | production of aluminum foil | production of electricity | usage of aluminum foil |
| aluminum | 1.0 | -1.0 | -0.01 | -0.0 |
| AluminumFoil | 0.0 | 1.0 | 0.00 | -1.0 |
| electricity | -50.0 | -1.0 | 1.00 | 0.0 |
| SandwichPackages | 0.0 | 0.0 | 0.00 | 1.0 |
Display the solution of the process values.
print(solution)
The expected output would be as follows.
[ 0.202 0.1 10.2 0.1 ]
Display the names of the environmental impacts and their solutions.
flowName,b,loadName=dp.GetName()
print('Names of the environmental impacts=',loadName)
print('Their solutions=',loadValue)
The expected output would be as follows.
Names of the environmental impacts= ['SolidWaste', 'CO2']
Their solutions= [22.52 30.6 ]
Calculation of sensitivity matrix.
i=1
print('Calculation of sensitivity matrix for environmental load:',loadName[i])
print(dp.rbld.mlca.Smat(i))
The expected output would be as follows.
Calculation of sensitivity matrix for environmental load: CO2
[[-1.98039216 0.98039216 1. -0. ]
[-0. -1. -0. 1. ]
[ 1.98039216 0.01960784 -2. -0. ]
[-0. -0. -0. -1. ]]
Release files for mlcarel 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mlcarel-0.2.0.tar.gz | 24.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mlcarel-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.1 kB
Release files / mlcarel-0.2.0.tar.gz
| Download URL | mlcarel-0.2.0.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e8d748bf7272687573d5881fb169b68bef902605c767a55adf7c842c4101c5c
|
|
BLAKE2b-256 checksum How to use checksums |
3e7c936b5744b520a842036d977142de8068303751763b764507645c060c6faa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|
Release files / mlcarel-0.2.0-py3-none-any.whl
| Download URL | mlcarel-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21f2adbe3bc1e133364a50b8461553aea7f711ccbdc12fb498e7f572336ee121
|
|
BLAKE2b-256 checksum How to use checksums |
51317c7a778745549e6d576ce11bec7c7701bd875a5b83a231e162f36cebd63f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.13
|