GreenDelta / olca-ipc.py

Mozilla Public License 2.0
29 stars 17 forks source link

AllocationType not set properly using IPC #7

Closed gthoma closed 1 month ago

gthoma commented 4 years ago

for my product system, i get different results when I run manually in OLCA and there are different results depending on the allocation selection (none vs. as defined in process). However, regardless of teh AllocationType definition in the code below, the result returned is the same as choosing 'none' in the dropdown menu. tst =['product system name'] for sc in tst:

setup = olca.CalculationSetup()
setup.calculation_type = olca.CalculationType.CONTRIBUTION_ANALYSIS
setup.allocation_method = olca.AllocationType.ECONOMIC_ALLOCATION
setup.impact_method = client.find(olca.ImpactMethod, 'ReCiPe 2016 Midpoint (H)')
setup.product_system = client.find(olca.ProductSystem, sc)
setup.amount = 1.0
result = client.calculate(setup)
client.excel_export(result, sc + 'ea.xlsx')
client.dispose(result)
btciavol commented 3 years ago

I've been having the same issue - it appears from one of the responses to #11 that there's a fix slated for v2.0. Is there a chance of the fix making it into a stable build soon? Otherwise would it be possible to get an OS X build of 2.0?

bl-young commented 1 year ago

The test for allocation method is no longer successful. It has not been updated with the latest changes to the module names, e.g.,: import olca as ipc AttributeError: 'Result' object has no attribute 'flow_results'

I am still having trouble getting the results in v2 to align with the selected allocation method

msrocka commented 1 month ago

closing as this is probably not an issue anymore in current versions; for allocation there is also a working test case https://github.com/GreenDelta/olca-ipc.py/blob/master/tests/test_allocation.py