Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
1

running energy plus in python using eppy

asked 2023-03-02 07:24:57 -0600

updated 2023-03-02 09:08:09 -0600

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-03-02 10:43:04 -0600

santoshphilip's avatar

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)
edit flag offensive delete link more

Comments

It worked. Thanks.

divsood04's avatar divsood04  ( 2023-03-03 06:49:55 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2023-03-02 07:24:57 -0600

Seen: 270 times

Last updated: Mar 02 '23