-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simulation using eppy fails after modifying materials in IDF file #420
Comments
@giovanna99zz , I am looking at the issue right now. |
when you type code in the comments, put 4 spaces before the code. It will show up as code. You can hit. the preview tab to ensure that your comment is formatted well I am not yet seeing where the probelm is occuring. In the meantime, Two questions: Question 1. What is your intent with this code
I can see a potential problem in the code. Let me show through a simple example.
Question 2. Use Make these changes, rerun your code and see what happens. |
@santoshphilip But when I modified the thickness of the insulation material, it reports error again. Could you help me with this new problem? At this stage, the thickness of the materials has been modified successfully (I've checked the idf file in EnergyPlus idf editor). idf1.saveas(r'D://Designbuilder/Project eptry/practice-5.idf') And this time it reports errors: File c:\Users\zhang\anaconda3\lib\subprocess.py:369, in check_call(*popenargs, **kwargs) CalledProcessError: Command '['C:\Energypl\energyplus.exe', '--weather', 'D:\Designbuilder\Project eptry\AUS_VIC.Melbourne.948660_IWEC.epw', '--output-directory', 'd:\Pycharm projects', '--idd', 'C:\Energypl\Energy+.idd', 'D:\Designbuilder\Project eptry\practice-5.idf']' returned non-zero exit status 1. During handling of the above exception, another exception occurred: EnergyPlusRunError Traceback (most recent call last) File c:\Users\zhang\anaconda3\lib\site-packages\eppy\modeleditor.py:1132, in IDF.runfile(self, **kwargs) |
For the question 1: I've just followed the eppy tutorial to see what kind of materials in this idf. |
Hi Santosh,
I'm running into an issue with my eppy scripts when trying to run .idf files after modifying the materials.
Initially, I created an IDF file named "practice-2.idf" using DesignBuilder and ran a successful energyplus simulation in Python using eppy. The simulation produced an HTM file, which I was able to read and extract values from.
However, when I modified the materials in the original IDF file and tried to run a new simulation using Python with eppy, I encountered an error message: "Fatal error -- final processing. Program exited before simulations began."
Could you please suggest any solutions to help me overcome this error?
Here are some details:
Energyplus version of 9.4.0
DesignBuilder version of 7.0.1.006
And here is the code I wrote:
import copy
import numpy as np
import pandas as pd
import random
import os
import sys
from eppy import modeleditor
from eppy.modeleditor import IDF
import witheppy.runner
import eppy
import witheppy.runandget as runandget
import pprint
import witheppy.runandget as runandget
from eppy.results import readhtml
from eppy.runner.run_functions import runIDFs
import concurrent.futures
import multiprocessing
import random
import subprocess
def worker(workerid):
print(f"start {workerid}")
p = subprocess.Popen(["sleep", f"{random.randint(1,30)}"])
p.wait()
print(f"stop {workerid}")
return workerid
def main():
tasks = []
with concurrent.futures.ThreadPoolExecutor(max_workers=20) as pool:
for i in range(20):
tasks.append(pool.submit(worker, i))
main()
pathnameto_eppy = "C:/Energypl"
sys.path.append(pathnameto_eppy)
iddfile = "C:/Energypl/Energy+.idd"
fname1 = r"D:/Designbuilder/Project eptry/practice-3.idf"
IDF.setiddname(iddfile)
idf1 = IDF(fname1)
idf1.printidf()
building = idf1.idfobjects['BUILDING'][0]
building.Name = "Empire State Building"
materials = idf1.idfobjects["MATERIAL"]
firstmaterial = materials[0]
materials.append(materials[0])
print(len(materials))
idf1.saveas(r'D://Designbuilder/Project eptry/practice-4.idf')
epwfile = r"D://Designbuilder/Project eptry/AUS_VIC.Melbourne.948660_IWEC.epw"
idfname = r"D://Designbuilder/Project eptry/practice-4.idf"
idf = IDF(idfname, epwfile)
idf.runfile()
And I am getting the below error. Could you help me with this error?
CalledProcessError Traceback (most recent call last)
File c:\Users\zhang\anaconda3\lib\site-packages\eppy\runner\run_functions.py:381, in run(idf, weather, output_directory, annual, design_day, idd, epmacro, expandobjects, readvars, output_prefix, output_suffix, version, verbose, ep_version)
380 print("\r\n" + " ".join(cmd) + "\r\n")
--> 381 check_call(cmd)
382 elif verbose == "q":
File c:\Users\zhang\anaconda3\lib\subprocess.py:369, in check_call(*popenargs, **kwargs)
368 cmd = popenargs[0]
--> 369 raise CalledProcessError(retcode, cmd)
370 return 0
CalledProcessError: Command '['C:\Energypl\energyplus.exe', '--weather', 'D:\Designbuilder\Project eptry\AUS_VIC.Melbourne.948660_IWEC.epw', '--output-directory', 'd:\Pycharm projects', '--idd', 'C:\Energypl\Energy+.idd', 'D:\Designbuilder\Project eptry\practice-4.idf']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
EnergyPlusRunError Traceback (most recent call last)
Cell In[31], line 1
----> 1 idf.runfile()
File c:\Users\zhang\anaconda3\lib\site-packages\eppy\modeleditor.py:1132, in IDF.runfile(self, **kwargs)
1130 epw = kwargs.pop("weather", self.epw)
1131 try:
-> 1132 run(self, weather=epw, idd=idd, **kwargs)
1133 finally:
...
************* Fatal error -- final processing. Program exited before simulations began. See previous error messages.
************* EnergyPlus Warmup Error Summary. During Warmup: 0 Warning; 0 Severe Errors.
************* EnergyPlus Sizing Error Summary. During Sizing: 0 Warning; 0 Severe Errors.
************* EnergyPlus Terminated--Fatal Error Detected. 0 Warning; 4 Severe Errors; Elapsed Time=00hr 00min 0.47sec
Thanks in advance.
The text was updated successfully, but these errors were encountered: