EnergyPlus FMU running simulation for 1 time step
How can an EnergyPlus FMU (created with https://github.com/lbl-srg/EnergyPlus...) be run for the minimum timestep of 60 seconds? When attempting to run the .fmu model with PyFMI (https://github.com/modelon/PyFMI) with either
from pyfmi import load_fmu
model = load_fmu(fmu= '../fmu/test_eplus.fmu')
model.initialize()
or
from pyfmi import load_fmu
model = load_fmu(fmu= '../fmu/test_eplus.fmu')
final_time = 60.0*60*24*1+60
start_time = 60.0*60*24*1
idf_steps_per_hour = 60
ncp = (final_time-start_time)/(3600./idf_steps_per_hour)
opts['ncp'] = ncp
res = model.simulate(
start_time=start_time,
final_time=final_time,
options=opts
)
both return the error:
[ERROR][Slave] [error][FMU status:Error] fmiInitializeSlave: The delta between the FMU stop time 86460.000000 and the FMU start time 86400.000000 must be a multiple of 86400. This is required by EnergyPlus. The current delta is 60.000000. Instantiation of Slave failed.
How can I simulate the EnergyPlus FMU for less than 86400 seconds (1 day) as a time step? The minimal time step for EnergyPlus is 60 seconds so I'm not sure where this 1 day requirement comes in.
Edit: it appears that I can run a single 60s time step with:
start_time = 60.0*60*24*1
final_time = 60.0*60*24*3
model.initialize(start_time, final_time)
t_step = start_time
res = {}
while t_step < final_time:
res[t_step] = model.do_step(current_t=t_step, step_size=step_size, new_step=True)
t_step += step_size
Need to check that this works with non-dummy model. Thanks for reading this far! Anyone have better ideas?