OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

Incorrect error message "FMU "XX" doesn't support co-simulation mode." even thought "model exchange" is the mode that is missing.

Open GorbadPS3 opened this issue 1 year ago • 0 comments

Description

When I attempt to run an SSP model that looks like this:

image

It works correctly, as long as the highlighted "Modelica_Blocks..." FMU's modelDescription.xml contains both ModelExchange and CoSimulation definitions.

However, if I remove "ModelExchange" definition from the modelDescription.xml, I am seeing the following error:

Wed Oct 02 15:40:05 2024 | info: Initializing logging (OMSimulator v2.1.2.post6-g637a1c9-win-notlm) Wed Oct 02 15:40:05 2024 | error: [NewComponent] FMU "Modelica_Blocks_Sources_Trapezoid" doesn't support co-simulation mode.

If I remove the "CoSimulation" definition from the modelDescription.xml, then I am not seeing an error.

This suggests that the error message is incorrect. Looking at the class "ComponentFMUME.cpp", it looks like the error message might be wrong there.

Steps to reproduce the behavior

Try running an FMU model in OMSimulator without ModelExchange, when OMSimulator wants to use ModelExchange.

Expected behavior

Expected error message to mention that ModelExchange is missing.

Version and OS

  • Version: v2.1.2.post6-g637a1c9-win-notlm
  • OS: Win11, 64bit

GorbadPS3 avatar Oct 02 '24 13:10 GorbadPS3