First time here? Check out the Help page!

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

compatibility of eppy with EnergyPlus version

asked 1 year ago

Ali-Khosravani's avatar

updated 1 year ago

I am trying to call idf in python and change the heating and cooling setpoints and then run it through Python. I am using EnergyPlusV22-1-0. I did lots of research and ended up using "eppy". In the following code, I get an error that means eppy is not compatible with my EnergyPlus version, I guess (not sure). Code:

from eppy import modeleditor
from eppy.modeleditor import IDF
import subprocess

idf_path = "D:\\university\\PhD\\PhD-thesis\\Phase-3\\API\\Example.idf"
idf = IDF(idf_path) ***(Here I get the error)***

heating_schedule_name = "YourHeatingScheduleName"
new_heating_schedule_values = [20.0] * 24  # New setpoint values for 24 hours

schedule = idf.getobject("SCHEDULE:COMPACT", heating_schedule_name)

schedule["HourlyValues"] = new_heating_schedule_values

modified_idf_path = "path/to/modified/input.idf"
idf.save(modified_idf_path)

energyplus_exe = "path/to/EnergyPlus/executable"
idf_weather = "path/to/weather/file"

subprocess.run([energyplus_exe, "-r", "-w", idf_weather, modified_idf_path])

Error: make_idd_index() missing 1 required positional argument: 'debug'

Does anyone have any similar experience with compatibility of eppy with EnergyPlus version? Any help is appreciated.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 1 year ago

updated 1 year ago

Have you tried loading the IDD file explicitly before loading your IDF? For example:

from eppy import modeleditor
from eppy.modeleditor import IDF

IDF.setiddname(r"C:\\EnergyPlusV22-1-0\\Energy+.idd")
idf_file = IDF(r"C:\\EnergyPlusV22-1-0\\ExampleFiles\\1ZoneUncontrolledAnnualOutputs.idf")
Preview: (hide)
link

Comments

Yes, I tried that, and it give the same error.

Ali-Khosravani's avatar Ali-Khosravani  ( 1 year ago )

Which version of Python and eppy are you using?

Jeremy's avatar Jeremy  ( 1 year ago )

I am using these: Eppy: Version 0.5.63 Python: Version 3.8.8 (Jupyter Notebook) EnergyPlus: Version 22-1-0

Ali-Khosravani's avatar Ali-Khosravani  ( 1 year ago )

Hey, did you figure out?

Ro_Adh's avatar Ro_Adh  ( 1 year ago )

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: 1 year ago

Seen: 259 times

Last updated: Aug 09 '23