The delta between the FMU stop time 1 and the FMU start time 0 must be a multiple of 86400

asked 2024-05-17 09:12:35 -0500

Burns's avatar

updated 2024-05-18 17:45:57 -0500

Hiho,

I used the FMU Example file from here: https://github.com/lbl-srg/EnergyPlus...

When trying to simulate a example fmu file with pyfmi:

try:
    model.initialize(start_time, stop_time)
    result = model.simulate(start_time=start_time, final_time=time_stop, time_step=time_step)

except Exception:
    print(model.get_log())

i get the error (and it makes no difference if i change the start or stop or step time, these parameter seem to have no effect here):

['FMIL: module = Model, log level = 2: [error][FMU status:Error] fmi2EnterInitializationMode: The delta between the FMU stop time 1.000000 and the FMU start time 0.000000 must be a multiple of 86400. This is required by EnergyPlus. The current delta is 1.000000. Instantiation of Model failed.', '']

has anyone a solution to this error?

edit retag flag offensive close merge delete

Comments

Hi, basically, you must define the same time-step (in seconds) in your FMU-world as ist defined in the E+ model (the linked model has 6 TS, so 10 min so 600 sec). The message seems to imply that you have days defined somewhere and one second elsewhere. What are your values for start_time, ...?

AGeissler's avatar AGeissler  ( 2024-05-21 04:00:56 -0500 )edit

Ah okay, thx @AGeissler, makes sense. Start_time I set at 0 (but tried also 86400).

start_time = 0
time_step = 86400 # tried also 600 and 60, same error
days = 10
hours = 24
minutes = 60
seconds = 60
time_stop = days * hours * minutes * seconds

Where in the IDF Editor or the IDF can I edit the Start and Step time? I set

Timestep, 6;                                      !- Number of Timesteps per Hour
Burns's avatar Burns  ( 2024-05-21 04:22:12 -0500 )edit

Start and stop times are "from outside", i.e. the FMU-world, only. Start_time 0, time_stop 86400 (or whatever) and time_step 600 >should< work when the .idf is set to 6 TS/h, as it is. If that combination gives the same error, the issue is likely elsewhere. And the error should then read "must be a multiple of 600".

AGeissler's avatar AGeissler  ( 2024-05-21 05:21:29 -0500 )edit