-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Characterization matrix ... rabbit hole #97
Comments
This feels like an anti-pattern to me - it would be much better to import the library and subclass the elements that you need to change instead. I have seen people do this in the past, including myself, and it has always led to regrets.
It's on pypi, just use
You can do this now, e.g.
Sure, but then don't pass an LCIA method, just run your function on
I don't think I got this 100%, but there are a few things to be aware of:
|
I agree, in the version I was using, everything was happening in the MultiLCA constructor, so seemed a good approach to dissect the parts of it and move it into individual functions.
I will totally try this and refactor my code around that. However for a simple case it crashes at
And I strongly assume, that it's because I am passing an empty array as
I will have a look, thanks!
I would actually run it on inventory.sum(1), in my tests that worked, and I assume it's faster, since the functions are only called just once per row/(biosphere flow?) instead of for each biosphere * technosphere
That is interesting! :) makes a lot of sense, but I did not see that in the code.
Yes that is what I generally do, and I did it in a more rigidusros test, than the one above. |
I am integrating brightway into tool, for which I am copying different pieces of the MultiLCA code together.
That tool allows to specify a json file with activities, their functional units and methods and it will run a MultiLCA with those selected items. However, there are more features that we wanted to integrate, that's why I took the MultiLCA code and extended it so it allows:
So I had to extend the MultiLCA quite a bit to be able to do all those things.
However, recently we ran some experiments and noticed that for large numbers of methods (e.g. 20 or more) the values are for some methods completely off. After a bit off digging, scripting logging I noticed that when I would calculate the hashes of the individual characterization matrices, they would be different than for a MultiLCA class that is in bw.
The error is NOT very consistent yet, so it's still very confusing for many methods so I needed to simplify it more.
So I start this thread with a simple question.
Trying to simplify the setup and understand what's going on, I created this small script, that
creates a lca , loads the characterization_matrix and compares it characterization factors of the same Method:
My question would be, shoudn't those values be more or less the same... because for me they are not :/
The text was updated successfully, but these errors were encountered: