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 2023-08-09 13:12:15 -0600

Ali-Khosravani's avatar

updated 2023-08-09 14:57:25 -0600

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-08-09 16:12:32 -0600

updated 2023-08-09 16:14:27 -0600

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

Comments

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

Ali-Khosravani's avatar Ali-Khosravani  ( 2023-08-11 12:20:21 -0600 )edit

Which version of Python and eppy are you using?

Jeremy's avatar Jeremy  ( 2023-08-11 12:49:21 -0600 )edit

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  ( 2023-08-11 13:29:45 -0600 )edit

Hey, did you figure out?

Ro_Adh's avatar Ro_Adh  ( 2024-03-25 20:22:57 -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-08-09 13:12:15 -0600

Seen: 177 times

Last updated: Aug 09 '23