1

compatibility of eppy with EnergyPlus version

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.

Ali-Khosravani's avatar
65
Ali-Khosravani
asked 2023-08-09 13:12:15 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2023-08-09 14:57:25 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

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")
Jeremy's avatar
1.6k
Jeremy
answered 2023-08-09 16:12:32 -0500, updated 2023-08-09 16:14:27 -0500
edit flag offensive 0 remove flag delete link

Comments

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

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

Which version of Python and eppy are you using?

Jeremy's avatar Jeremy (2023-08-11 12:49:21 -0500) 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 -0500) edit

Hey, did you figure out?

Ro_Adh's avatar Ro_Adh (2024-03-25 20:22:57 -0500) edit
add a comment see more comments