Open orcunkoraliseri opened 1 year ago
somehow waitlist for ptcp.idf_multirun do not apply equally to all IDF.
In parallel, I am trying runIDFs() from eppy and applying multiple processors. thankfully, make_optional(IDF) worked equally for every IDF.
Can you post source code for both your attempts ?
For simulations with zeppy:
def ZeppySim(idfDir, epw, nworkers, verbose):
'''
:param inputDir: directory of idf files
:param epw: Eplus weather file
'''
listIdf = erf.idffilesTolist(idfDir)["path"]
idfs = [ep.openidf(fname=fname, epw=epw) for fname in listIdf]
waitlist = [[{'args':idf, 'kwargs':make_options(idf)}] for idf in idfs]
func = idf_multirun
result = ptcp.ipc_parallelpipe(func, waitlist, nworkers=nworkers, verbose=verbose)
print(result)
def idf_multirun(idf_kwargs):
idf = idf_kwargs["args"]
options = idf_kwargs["kwargs"]
idf.run(**options)
For simulations with Multi-Eppy (runIDFs):
def simMultiEppy(inputDir, epwFile): #works with runIDFs
'''
:param inputDir: directory of idf files
:param epw: Eplus weather file
'''
runs = multipleRuns(inputDir, epwFile)
runIDFs(runs, processors=8)
def multipleRuns(inputDir, epwFile): # append runs directories into list
runs = []
listIdf = erf.idffilesTolist(inputDir)["path"] # append idf files paths into the list
for i in range(len(listIdf)):
idf = ep.openidf(fname=listIdf[i], epw=epwFile)
runs.append([idf, make_options(idf)])
return runs
I want to simulate multiple .idfs but the same make_options(IDF) variables are not applied for each .idf. I need the .csv outputs as I read the simulation results hourly. Although 'expandobjects':True under make_options(IDF) the simulations do not generate .csv for every .idf.
Did you encounter a similar problem before?