Hii there!
Does anyone maybe knows and can please tell me how and where to fix this error "Exception: Failed to instantiate model" which occurs in the FMPy gui: generated notebook, when running:
fmi2EnterInitializationMode: [OK] fmi2Instantiate: The delta between the Resource location of FMU stop time 3,0000000 and the FMU start time 0,0000000 must be a multiple of 86400. This with instance name in_AC5 is required by EnergyPlus. file:///tmp/tmpvd7e2sjz/resources.
[OK] The current delta working directory is 3,0000000. /home/burns/PycharmProjects/MasterThesis/notebooks/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5
[OK] fmi2Instantiate: Path to fmuUnzipLocation ///tmp/tmpvd7e2sjz//
[OK] fmi2Instantiate: Path to fmuResourceLocation ///tmp/tmpvd7e2sjz//resources//
[OK] Command executes to copy content of resources folder: cp -f "///tmp/tmpvd7e2sjz//resources//"variables.cfg "/home/burns/PycharmProjects/MasterThesis/notebooks/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5/Output_EPExport_in_AC5//Output_EPExport_in_AC5//"
[OK] fmi2Instantiate: Path to model description file is ///tmp/tmpvd7e2sjz//modelDescription.xml.
[ERROR] fmi2Instantiate: Failed to parse the model description found in directory ///tmp/tmpvd7e2sjz//modelDescription.xml. Instantiation of in_AC5 failed.
the RunPeriod failed
[OK] freeInstanceResources: in_AC5 will be freed.
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
Cell In[8], line 18
7 start_values = {
8 # variable start unit description
9 # 'TRooMea': (22.0, 'C'),
10 'TMeanAir': (22.0, 'C'),
11
12 }
14 output = [
15 'TMeanAir', # IDF line 10754
16 ]
---> 18 result = simulate_fmu(filename, start_values=start_values, output=output, stop_time=86400)
20 plot_result(result)
File ~/.local/lib/python3.10/site-packages/fmpy/simulation.py:741, in the idf file looks as follows:
!- =========== ALL OBJECTS IN CLASS: RUNPERIOD ===========
RunPeriod,
Run Period 1, !- Name
6, !- Begin Month
1, !- Begin Day of Month
2019, !- Begin Year
6, !- End Month
30, !- End Day of Month
2019, !- End Year
Monday, !- Day of Week for Start Day
No, !- Use Weather simulate_fmu(filename, validate, start_time, stop_time, solver, step_size, relative_tolerance, output_interval, record_events, fmi_type, start_values, apply_default_start_values, input, output, timeout, debug_logging, visible, logger, fmi_call_logger, step_finished, model_description, fmu_instance, set_input_derivatives, remote_platform, early_return_allowed, use_event_mode, initialize, terminate, fmu_state, set_stop_time)
738 add_remoting(unzipdir, host_platform=platform, remote_platform=remote_platform)
740 if fmu_instance is None:
--> 741 fmu = instantiate_fmu(unzipdir, model_description, fmi_type, visible, debug_logging, logger, fmi_call_logger, None, early_return_allowed, use_event_mode, None, validate)
742 else:
743 fmu = fmu_instance
File Holidays and Special Days
No, !- Use Weather ~/.local/lib/python3.10/site-packages/fmpy/simulation.py:824, in instantiate_fmu(unzipdir, model_description, fmi_type, visible, debug_logging, logger, fmi_call_logger, library_path, early_return_allowed, event_mode_used, intermediate_update, require_functions)
822 elif is_fmi2:
823 fmu = FMU2Slave(**fmu_args)
--> 824 fmu.instantiate(visible=visible, callbacks=callbacks, loggingOn=debug_logging)
825 else:
826 fmu = fmi3.FMU3Slave(**fmu_args)
File Daylight Saving Period
Yes, !- Apply Weekend Holiday Rule
Yes, !- Use Weather File Rain Indicators
Yes; !- Use Weather File Snow Indicators
~/.local/lib/python3.10/site-packages/fmpy/fmi2.py:254, in _FMU2.instantiate(self, visible, callbacks, loggingOn)
245 self.component = self.fmi2Instantiate(self.instanceName.encode('utf-8'),
246 kind,
247 self.guid.encode('utf-8'),
(...)
250 fmi2True if visible else fmi2False,
251 fmi2True if loggingOn else fmi2False)
253 if self.component is None:
--> 254 raise Exception("Failed to instantiate model")
Exception: Failed to instantiate model
Thx in advance and looking forward!
nice greets
burns