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

scrox's profile - activity

2021-08-16 01:51:20 -0500 marked best answer How to set different working directories for parallel simulations?

Hi!

I want to run simultaneously multiple simulations. The problem is that every simulation exports its files to the same folder, "Output_EPExport_Slave", in the current working directory. It therefore overwrites variables.cfg file and the first simulation fails since it cannot find the corresponding variables.

Is there are way to set different working directories? In my code you can see a work-around. I would like to avoid that. The different folder paths in the load_fmu seems not to set the working directory. Not sure whether that is a Energyplus or PyFMI problem.

from   pyfmi import load_fmu,fmi
import numpy as np
import os      
model1_fmu  = 'file1.fmu'
model2_fmu  = 'file2.fmu'
model1_path = 'path'
model2_path = 'path'
os.chdir(model1_path)
model1      = load_fmu(model1_fmu,model1_path)
os.chdir(model2_path)
model2      = load_fmu(model2_fmu,model2_path)
final_time  = 60*60*24*3
step_size   = 60*10
start_time  = 0
os.chdir(model1_path)
model1.initialize(start_time,final_time)
os.chdir(model2_path)    
model2.initialize(start_time,final_time)
t_step      = start_time
res_heat1 = []
res_heat2 = []
while t_step < final_time:
    print(t_step)
    temperature = 15.
    shading     = 6
    model1.set('drybulbtemp',temperature)
    model2.set('yShade', shading)
    os.chdir(model1_path)
    status1 = model1.do_step(current_t=t_step, step_size=step_size)
    os.chdir(model2_path)
    status2 = model2.do_step(current_t=t_step, step_size=step_size)
    print('Status: ',status1,' ',status2)

    res_heat1.append(model1.get('heat')[0])
    res_heat2.append(model2.get('heat')[0])

    t_step += step_size
2019-11-27 22:17:19 -0500 commented answer How to set different working directories for parallel simulations?

Unfortunately, I cannot concur. Although my fmu files have unique names (there was a mistake in the example, sorry), the

2019-11-27 21:59:06 -0500 edited question How to set different working directories for parallel simulations?

How to set different working directories for parallel simulations? Hi! I want to run simultaneously multiple simulation

2019-11-27 08:59:09 -0500 received badge  Student (source)
2019-10-28 11:28:32 -0500 commented question How to set different working directories for parallel simulations?

that is possible, maybe with acron in linux. but it would make the simulation set-up not easier and I would lose central

2019-10-24 15:41:26 -0500 asked a question How to set different working directories for parallel simulations?

How to set different working directories for parallel simulations? Hi! I want to run simultaneously multiple simulation

2019-09-06 10:22:24 -0500 asked a question How to convert Baseboard U-Factor times Area to Heating Design Capacity?

How to convert Baseboard U-Factor times Area to Heating Design Capacity? I simulated a single zone building with a baseb

2019-08-23 13:27:51 -0500 asked a question Reproduction of autosized simulation: Baseboard:RadiantConvective:Water

Reproduction of autosized simulation: Baseboard:RadiantConvective:Water I am working on a real-time simulation (for resi

2019-05-30 14:20:45 -0500 commented answer Can someone please provide me the steps for openstudio installation in Ubuntu 16.04 ?

I was wondering whether the geometry tab works in your xenial built? In the 3D view, it just shows error