2

Import fmu from EnergyPlus to Modelica

I am trying to couple EnergyPlus and Modelica using FMI. I exported an EnergyPlus model as fmu and imported it to Modelica. I tried to duplicate the model shown in http://simulationresearch.lbl.gov/fmu.... I used the schedule object from EnergyPlusFMU to create the FMU.

when i am checking for syntax errors i am getting the following warnings

" - LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiModel.

  • LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiModel.destructor.

  • LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiSetReal.

  • LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiDoStep.

  • LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiGetReal.

  • LibraryDirectory annotation must specify an existing directory. This was not the case for function _fmu_export_schedule_fmu.fmi_Functions.fmiInitializeSlave."

When i simulate the model i receive the error "Note: There were translation errors that might explain the problem. Compiler message: Compiling and linking the model (Visual C++).

dsmodel.c dsmodel.c(73) : warning C4090: 'initializing' : different 'const' qualifiers dsmodel.c(74) : warning C4090: 'initializing' : different 'const' qualifiers dsmodel.c(281) : warning C4244: '=' : conversion from 'double' to 'int', possible loss of data dsmodel.c(889) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data dsmodel.c(1027) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data dsmodel.c(1293) : warning C4244: 'initializing' : conversion from 'double' to 'int', possible loss of data LINK : fatal error LNK1181: cannot open input file '_fmu_export_schedule.lib'

Error generating Dymosim." which i assume is connected to the warnings.

Can someone please help me?

Charalampos Angelopoulos's avatar
386
Charalampos Angelopoulos
asked 2017-09-13 10:44:58 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2018-05-21 15:11:16 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

1

You most likely didn't add EnergyPlus to your system path as indicated in the user guide.

Thierry Nouidui's avatar
1.5k
Thierry Nouidui
answered 2017-09-14 15:04:26 -0500
edit flag offensive 0 remove flag delete link

Comments

I added EnergyPlus to my path system, and i still get the same error! Also, i have to manually set the directory for the Dymola to locate the fmi_fmuLocation. Are these errors connected to each other? Does it mean that the one creates the other? Also, when i create the FMU i follow the TROUBLESHOOTING (page 16 UserGuide) and i get the modelDescription.xml and variables.cfg so i assume that the FMU has been created correctly.

Charalampos Angelopoulos's avatar Charalampos Angelopoulos (2017-09-15 13:31:10 -0500) edit
add a comment see more comments
1

Over the weekend and today, I ve tried multiple times to generate the FMU but I always get the same error.

*[fmiError]: test_file_FMU_fmu: fmiInitializeSlave: Could not create the input and weather file. Initialization of test_file_FMU_fmu failed. The following error was detected at time: 0 InitializeSlave failed The stack of functions is: test_file_FMU_fmu.fmi_Functions.fmiInitializeSlave test_file_FMU_fmu.fmi_Functions.fmiInitializeSlave( test_file_FMU_fmu1.fmi, test_file_FMU_fmu1.fmi_StartTime, test_file_FMU_fmu1.fmi_forceShutDownAtStopTime, test_file_FMU_fmu1.fmi_StopTime, test_file_FMU_fmu1.fmi_AParamsAndStart+test_file_FMU_fmu1.fmi_initInput0) Error: Failed to start model. Just to remind you that I am using EnergyPlusv8-6-0,EnergyPlusToFMUv2-0-2,Dymola 2017FD01. Is there any incompatibility between these versions?

I am not sure what is the source of the problem. Furthermore, the userGuide says that after the simulation a folder Output_EPExport_xxx will be created. But I don’t have it. Do I miss something? Is this normal since I don’t have any successful simulation?

Charalampos Angelopoulos's avatar
386
Charalampos Angelopoulos
answered 2017-09-18 12:38:08 -0500
edit flag offensive 0 remove flag delete link

Comments

were you able to fix your issues?

Thierry Nouidui's avatar Thierry Nouidui (2017-10-11 12:01:17 -0500) edit
add a comment see more comments