Module Contents#



An LCI or LCIA calculation.

class bw2calc.dense_lca.DenseLCA(demand: dict, method: Optional[tuple] = None, weighting: Optional[str] = None, normalization: Optional[str] = None, data_objs: Optional[Iterable[Union[pathlib.Path, fs.base.FS, bw_processing.DatapackageBase]]] = None, remapping_dicts: Optional[Iterable[dict]] = None, log_config: Optional[dict] = None, seed_override: Optional[int] = None, use_arrays: bool = False, use_distributions: bool = False)[source]#

Bases: bw2calc.lca.LCA

Inheritance diagram of bw2calc.dense_lca.DenseLCA

An LCI or LCIA calculation.

Compatible with Brightway2 and 2.5 semantics. Can be static, stochastic, or iterative (scenario-based), depending on the data_objs input data..

Create a new LCA calculation.

  • demand (dict): The demand or functional unit. Needs to be a dictionary to indicate amounts, e.g. {7: 2.5}.

  • method (tuple, optional): LCIA Method tuple, e.g. ("My", "great", "LCIA", "method"). Can be omitted if only interested in calculating the life cycle inventory.


A new LCA object


Master solution function for linear system \(Ax=B\).

To most numerical analysts, matrix inversion is a sin.

—Nicolas Higham, Accuracy and Stability of Numerical Algorithms, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2002, p. 260.

We use UMFpack, which is a very fast solver for sparse matrices.

If the technosphere matrix has already been factorized, then the decomposed technosphere (self.solver) is reused. Otherwise the calculation is redone completely.