2

I have been importing one simaproCSV dataset with a recipe

sp = SimaProCSVImporter("recipe.CSV","recipe")
sp.migrate("simapro-ecoinvent-3")
sp.apply_strategies()

and another simaproCSV dataset with 4 specific unit processes for some of the ingredients in the first dataset.

sp2 = SimaProCSVImporter("ingredients.CSV","ingredients")
sp2.migrate("simapro-ecoinvent-3")
sp2.apply_strategies()

By matching all exchanges of the ingredients with ecoinvent I am able to do impact assessments.

sp2.match_database("ecoinvent 3.2 cutoff",ignore_categories=True)
db = sp2.write_database()
lca = LCA(
     demand={db.random(): 1}, 
     method=('IPCC 2013', 'GWP', '100 years'),
)
lca.lci()
lca.lcia()
lca.score

As a next step I have matched the recipe dataset first with ecoinvent, and then second with the ingredient dataset.

sp.match_database("ecoinvent 3.2 cutoff",ignore_categories=True)
sp.match_database("ingredients",ignore_categories=True)
db2 = sp.write_database()

When I want to do the LCA calculation;

lca = LCA(
     demand={db2.random(): 1}, 
     method=('IPCC 2013', 'GWP', '100 years'),
)
lca.lci()
lca.lcia()
lca.score

I get the following error:

Technosphere matrix is not square: 12917 rows and 12921 products.

What did I do wrong, what is the best practice?

mklarmann
  • 33
  • 2

1 Answers1

0

Hard to say without seeing the actual data. Are you checking .statistics() each time to make sure there aren't any unlinked exchanges before writing the database? The warning message is a bit confusing (now fixed in 1.3.5), but you have too many products (rows) and not enough activities (columns). The most probable way this could happen is if you have an activity with multiple products, but again, impossible to say more or suggest fixes without seeing the actual data.

Chris Mutel
  • 2,549
  • 1
  • 14
  • 9