santoshphilip / eppy

scripting language for E+, Energyplus
MIT License
151 stars 67 forks source link

HVAC loop attribute error with EnergyPlus V8.7 #166

Open adChong opened 7 years ago

adChong commented 7 years ago

Hi,

I just started using eppy and was going through the HVAC_tutorial http://pythonhosted.org/eppy/HVAC_Tutorial.html However, the following code raised an attribute error and I believe it was because I was using the idd file for Version 8.7. It worked fine with the idd for Version 7.2 # make the topology of the loop idf = IDF(StringIO('')) # makes an empty idf file in memory with no file name loopname = "p_loop" sloop = ['sb0', ['sb1', 'sb2', 'sb3'], 'sb4'] # supply side of the loop dloop = ['db0', ['db1', 'db2', 'db3'], 'db4'] # demand side of the loop hvacbuilder.makeplantloop(idf, loopname, sloop, dloop) idf.saveas("hhh1.idf")

Thus wondering if the code would be updated to remove this error

Traceback (most recent call last): hvacbuilder.makeplantloop(idf, loopname, sloop, dloop) File "C:\ProgramData\Anaconda3\lib\site-packages\eppy\hvacbuilder.py", line 651, in makeplantloop branch = makepipebranch(idf, bname) File "C:\ProgramData\Anaconda3\lib\site-packages\eppy\hvacbuilder.py", line 100, in makepipebranch abranch.Component_1_Branch_Control_Type = "Bypass" File "C:\ProgramData\Anaconda3\lib\site-packages\eppy\bunch_subclass.py", line 284, in __setattr__ raise BadEPFieldError(astr) # TODO: could raise AttributeError

santoshphilip commented 7 years ago

I'll take a look

santoshphilip commented 7 years ago

work on this issue will be in branch i166_hvac (was 166_hvac).

I am going to modify all the tests so that they run on the version 8.7 IDD. This may catch other errors too

santoshphilip commented 7 years ago

renamed branch 166_hvac to i166_hvac

santoshphilip commented 7 years ago

Looks like somethings have changed since E+v7.0 To fix this I'll have to get my head back into E+ and it's HVAC :-(

In other words, This is going to take time. I'll update the Documentation to indicate that hvacbuilder is broken for versions higher than v7.0

santoshphilip commented 7 years ago

Updated the docs in develop branch indicate that hvacbuilder is broken for versions higher than v7.0