BioSTEAMDevelopmentGroup / Bioindustrial-Park

BioSTEAM's Premier Repository for Biorefinery Models and Results
MIT License
37 stars 18 forks source link

Oilcane biorefinery not functional #49

Closed daltonwstewart closed 1 year ago

daltonwstewart commented 1 year ago

Hi @yoelcortes

I've been trying to use the oilcane biorefinery according to the readme file, but I've been running into errors with the first two lines of code, even with the most recent biosteam,thermosteam, and biorefineries.

Previously, I got an error after runningimport biorefineries.oilcane as oc, but that was resolved after pulling the most recent versions of everything.

Now I'm getting errors with oc.load('S1'). I didn't save the error message, but Yalin and I thought the original error might have been due to pull request #131 because I think it mentioned heating or duty (I don't have the error message because I refreshed the kernel one more time and started getting a different error - sorry).

Now the error I get when running this line of code is: /Users/daltonwstewart/Documents/Code/thermosteam/thermosteam/utils/registry.py:116: RuntimeWarning: upon renaming, replaced in registry warn(warning, 4) /Users/daltonwstewart/Documents/Code/thermosteam/thermosteam/utils/registry.py:116: RuntimeWarning: upon renaming, replaced in registry warn(warning, 4) Traceback (most recent call last):

File "/Users/daltonwstewart/Documents/Code/thermosteam/thermosteam/utils/registry.py", line 85, in getattr return self.data[ID]

KeyError: 'cellulosic_based_diesel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/var/folders/j3/6p847wq92xxf4ljgy1fx3xyr0000gq/T/ipykernel_89078/2857990338.py", line 1, in oc.load('S1')

File "/Users/daltonwstewart/Documents/Code/Bioindustrial-Park/biorefineries/oilcane/init.py", line 766, in load @parameter(distribution=cbpd, element=s.cellulosic_based_diesel, units='USD/L', baseline=mcbp)

File "/Users/daltonwstewart/Documents/Code/thermosteam/thermosteam/utils/registry.py", line 87, in getattr raise AttributeError(f'{repr(ID)} not in registry')

AttributeError: 'cellulosic_based_diesel' not in registry

Which seems reasonably straightforward to fix. However, I'm not sure if the other potential issues have been resolved. I appreciate you looking into this because I'm planning to make a lot of use of the oilcane biorefinery. Please let me know if you need more info.

Thanks, Dalton

yoelcortes commented 1 year ago

@daltonwstewart,

Woops, some recent additions for the new cellulosic-diesel oilcane configuration conflicted with some of the other biorefineries. It should be working now, let me know if you run into anything else.

Thanks!