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

Import fmu from EnergyPlus to Modelica

asked 2017-09-13 10:44:58 -0600

Charalampos Angelopoulos's avatar

updated 2018-05-21 15:11:16 -0600

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?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-09-18 12:38:08 -0600

Charalampos Angelopoulos's avatar

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?

edit flag offensive delete link more

Comments

were you able to fix your issues?

Thierry Nouidui's avatar Thierry Nouidui  ( 2017-10-11 12:01:17 -0600 )edit
1

answered 2017-09-14 15:04:26 -0600

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

edit flag offensive delete link more

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 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

1 follower

Stats

Asked: 2017-09-13 10:44:58 -0600

Seen: 1,580 times

Last updated: Sep 18 '17