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

Revision history [back]

how to run EnergyPlus FMU through PyFMI

I wrapped one energyplus reference building into FMU and try to simulate the Energyplus-fmu using Pyfmi. My EnergyPlus has 60 seconds as the timestep size.

It looks like it can not go through. Any insightful comments are thankful.

The error i got: File "test_fmi2.py", line 15, in <module> status = model.do_step(current_t = t, step_size= step_size, new_step=True) AttributeError: 'pyfmi.fmi.FMUModelME2' object has no attribute 'do_step

The code snippet i am using is as below:

from pyfmi import load_fmu

model = load_fmu(MyEnergyplus.fmu")
start_time = 0
final_time = 60.0 * 60 * 24 * 3 #seconds
step_size = 60 # seconds

opts = model.simulate_options()
idf_steps_per_hour = 60
ncp = (final_time - start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp

t = 0

status = model.do_step(current_t = t, step_size= step_size, new_step=True)

how to run EnergyPlus FMU through PyFMI

I wrapped one energyplus reference building into FMU and try to simulate the Energyplus-fmu using Pyfmi. My EnergyPlus has 60 seconds as the timestep size.

It looks like it can not go through. Any insightful comments are thankful.

The error i got: File "test_fmi2.py", line 15, in <module> status = model.do_step(current_t = t, step_size= step_size, new_step=True) AttributeError: 'pyfmi.fmi.FMUModelME2' object has no attribute 'do_step

The code snippet i am using is as below:

from pyfmi import load_fmu

model = load_fmu(MyEnergyplus.fmu")
load_fmu("MyEnergyplus.fmu")
start_time = 0
final_time = 60.0 * 60 * 24 * 3 #seconds
step_size = 60 # seconds

opts = model.simulate_options()
idf_steps_per_hour = 60
ncp = (final_time - start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp

t = 0

status = model.do_step(current_t = t, step_size= step_size, new_step=True)

how to run EnergyPlus FMU through PyFMI

I wrapped one energyplus reference building into FMU and try to simulate the Energyplus-fmu using Pyfmi. My EnergyPlus has 60 seconds as the timestep size.

It looks like it can not go through. Any insightful comments are thankful.

The error i got: File "test_fmi2.py", line 15, in <module> status = model.do_step(current_t = t, step_size= step_size, new_step=True) AttributeError: 'pyfmi.fmi.FMUModelME2' object has no attribute 'do_step

The code snippet i am using is as below:

from pyfmi import load_fmu

model = load_fmu("MyEnergyplus.fmu")
start_time = 0
final_time = 60.0 * 60 * 24 * 3 #seconds
step_size = 60 # seconds

opts = model.simulate_options()
idf_steps_per_hour = 60
ncp = (final_time - start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp

t = 0

status = model.do_step(current_t = t, step_size= step_size, new_step=True)

how to run EnergyPlus FMU through PyFMI

I wrapped one energyplus reference building into FMU and try to simulate the Energyplus-fmu using Pyfmi. My EnergyPlus has 60 seconds as the timestep size.

It looks like it can not go through. Any insightful comments are thankful.

The error i got: File "test_fmi2.py", line 15, in <module> status = model.do_step(current_t = t, step_size= step_size, new_step=True) AttributeError: 'pyfmi.fmi.FMUModelME2' object has no attribute 'do_step

The code snippet i am using is as below:

from pyfmi import load_fmu

model = load_fmu("MyEnergyplus.fmu")
start_time = 0
final_time = 60.0 * 60 * 24 * 3 #seconds
step_size = 60 # seconds

opts = model.simulate_options()
idf_steps_per_hour = 60
ncp = (final_time - start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp

model.initialize(start_time, final_time)

t = 0

status = model.do_step(current_t = t, step_size= step_size, new_step=True)

how to run EnergyPlus FMU through PyFMI

I wrapped one energyplus reference building into FMU and try to simulate the Energyplus-fmu using Pyfmi. My EnergyPlus has 60 seconds as the timestep size.

It looks like it can not go through. Any insightful comments are thankful.

The error i got: File "test_fmi2.py", line 15, in <module> status = model.do_step(current_t = t, step_size= step_size, new_step=True) AttributeError: 'pyfmi.fmi.FMUModelME2' object has no attribute 'do_step

The code snippet i am using is as below:

from pyfmi import load_fmu

model = load_fmu("MyEnergyplus.fmu")
start_time = 0
final_time = 60.0 * 60 * 24 * 3 #seconds
step_size = 60 # seconds

opts = model.simulate_options()
idf_steps_per_hour = 60
ncp = (final_time - start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp

model.initialize(start_time, final_time)
model.initialize( )

t = 0

status = model.do_step(current_t = t, step_size= step_size, new_step=True)