You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current situation
BW diagonalizes the Inventory and Characterized results.
This is great to get access to all direct biosphere contributions from all activities.
Proposal
I suggest we keep this the default, but allow optional arguments (e.g. disaggregate_activities for lca.lci and disaggregate_biosphere for lca.lcia) that can be set to False to not dis-aggregate results.
This will increase calculation speed when active as the matrix multiplications will be with smaller matrices, though not by substantial amounts.
Why
While this effect is not substantial -especially for a single calculation-, it can help speed up repeat calculations where the dis-aggregated results are not needed, e.g. Monte-Carlo or Graph-Traversal could make use of this.
The text was updated successfully, but these errors were encountered:
It will be hard to remove the diagonalization during matrix construction, as the input data doesn't have row and column indices. You would really be fighting against the code, and I don't think that's worth doing (and I don't want to add to the already high complexity). But I can see doing the following:
Limit to pypardiso, and use its underlying code to skip the matrix identity checks
Set a flag on Monte Carlo to drop pypardiso cached results
(These two steps could be applied to the main LCA class, actually)
Don't diagonalize the supply array
Don't create matrices for characterized_inventory
I think @marc-vdm you would need to start this though...
One thing we would need to profile carefully before changing is whether we want to switch to numpy array multiplication instead of sparse matrix stuff. My guess is that it would make sense for the characterization array, but not for the biosphere (big increase in memory usage to build as a dense array).
Current situation
BW diagonalizes the Inventory and Characterized results.
This is great to get access to all direct biosphere contributions from all activities.
e.g. here, here, here and here
Proposal
I suggest we keep this the default, but allow optional arguments (e.g.
disaggregate_activities
forlca.lci
anddisaggregate_biosphere
forlca.lcia
) that can be set toFalse
to not dis-aggregate results.This will increase calculation speed when active as the matrix multiplications will be with smaller matrices, though not by substantial amounts.
Why
While this effect is not substantial -especially for a single calculation-, it can help speed up repeat calculations where the dis-aggregated results are not needed, e.g. Monte-Carlo or Graph-Traversal could make use of this.
The text was updated successfully, but these errors were encountered: