brightway


find a product that causes a non-square technosphere matrix with Brightway2


As a prophecy, I have a question related to a previous question of "cleaning" the database. How can I identify why my technosphere is not longer square?
I have done something to my database that if I try to do an LCIA of a random activity
def testactivity(activity):
method_key=methods.random()
fu={activity:1}
lca = LCA(fu,method_key)
lca.lci()
lca.lcia()
print(lca.score)
return()
testactivity(Database('ei_33consequential').random())
I get this warning message: NonsquareTechnosphere: Technosphere matrix is not square: 12384 activities (columns) and 12385 products (rows). Use LeastSquaresLCA to solve this system, or fix the input data.
I tried to find if I have a dataset with two reference products, to check that I looped through the database to check if the "production amount" was not a float. but I didn't find anything "wrong"
for ds in Database('ei_33consequential'):
if (isinstance(act['production amount'],float))==False:
print(ds['name'])
Is this approach correct to find an activity with more than one reference flow?. Otherwise, how can I find the product which is making my matrix non inversable?
You can check to see which activities have more than one production exchange with something like this:
for a in Database("ecoinvent 3.3 cutoff"):
assert len(a.production()) == 1

Related Links

Get method tuple from abbreviation in Brightway2
Connecting exchange names and codes to LCA inventory results
copy projects between different computers
importing ecoinvent 3.2 with brightway
Brightway2: Modifying/deleting exchanges from activity without using activity as dict
Backups in Brightway: how to use them
Saving multiple activities to database in a loop in Brightway
Obtaining distribution of results from LCIA
Simapro dataset to ecoinvent migration fails in brightway2
What is the best practice when importing 2 simapro datasets in brightway2 to merge them together
How to manually link in Brightway2 an imported exchange, given I have found the correct one in ecoinvent
Can't write copy of activity in newly created databases
Are eco-indicator endpoints reported in points or millipoints
Multi and Parallel Monte Carlo fail with key error (on database name)
sparse matrix solver runs out of memory in parallaleized dynamic LCA
Accessing exchange data in Brightway2 database object

Categories

HOME
asterisk
actionscript-3
botframework
qemu
jenkins-pipeline
snappy
window.open
file-upload
latex
hex
spss
lithium
assign
angularjs-directive
markdown
google-api-oauth
restheart
annyang
rtc
wkhtmltopdf
ios-universal-links
google-my-business-api
desktop-application
eclipse-orion
project-structure
hl7-fhir
polybase
screen-scraping
rvm
waterfall
datanucleus
gulp-jshint
jboss-arquillian
keil
imdb
microstrategy
javafxports
gstreamer-1.0
azure-storage-files
strategy-pattern
yelp
armadillo
collation
jquery-ui-slider
web-technologies
apiman
cakephp-3.2
scrapinghub
codepen
activeandroid
g77
standard-error
computed-properties
symantec
python-rq
sqlxml
cexception
custom-build-step
fadein
askbot
jquery-draggable
libgcrypt
database-project
php-gd
lytro
jain-sip
musicbrainz
bootstrap-tabs
litedb
web-standards
accpac
conkeror
report-builder2.0
indic
switchpreference
nomachine
xml-validation
svg-android
pechkin
octokit
static-class
friendly-url
mysql2
setcookie
metapost
nsregularexpression
report-viewer2010
hypertable
github-archive
nsscrollview
optimistic-concurrency
eeprom
code-organization
yii-cactiverecord
isgl3d
conditional-operator
code-golf
numerical-computing
carbon-emacs
konsole
djangoappengine
ffdshow
bootstrap-protocol
unauthorized

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App