1

running energy plus in python using eppy

I am trying to run EnergyPlus in Python using eppy. here is the code.

idf_file = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/Dublin_1_House_2occV960_final.idf"
IDF.setiddname('/Applications/EnergyPlus-9-6-0/Energy+.idd')
idf = IDF(idf_file)
epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
idf.epw(epw_path)
output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
run(idf, output_directory = output_directory)

But when I run this code I got the following error


AttributeError                            Traceback (most recent call last)
/var/folders/24/kygczx3976d_r0xjqw14drvh0000gn/T/ipykernel_44774/2674705698.py in <module>
  1 epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
----> 2 idf.epw(epw_path)
  3 output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
  4 run(idf, output_directory = output_directory)

AttributeError: 'IDF' object has no attribute 'epw'

Can someone please help me with this?

divsood04's avatar
41
divsood04
asked 2023-03-02 07:24:57 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2023-03-02 09:08:09 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

untested code. I think should work:

idf_file = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/Dublin_1_House_2occV960_final.idf"
IDF.setiddname('/Applications/EnergyPlus-9-6-0/Energy+.idd')
epw_path = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial/IRL_DublinIWEC.epw"
idf = IDF(idf_file, epw_path)
output_directory = "/Users/divyanshusood/Documents/Work/RQ-2/Python_IDF_Trial"
idf.run(output_directory=output_directory)
santoshphilip's avatar
961
santoshphilip
answered 2023-03-02 10:43:04 -0500
edit flag offensive 0 remove flag delete link

Comments

It worked. Thanks.

divsood04's avatar divsood04 (2023-03-03 06:49:55 -0500) edit
add a comment see more comments