Opened 6 years ago

Last modified 3 years ago

#5345 new enhancement

omc-based FMI import in OMEdit

Reported by: Lennart Ochel Owned by: Adeel Asghar
Priority: critical Milestone: 2.0.0
Component: OMEdit Version:
Keywords: Cc: albertoleva

Description

In today’s developer meeting we discussed to removing the omc-based FMI import.

As a first step, we agreed on replacing the omc-based FMI import in OMEdit with a pointer to the OMSimulator documentation.

If there is a good reason to keep the omc-based fmi import, please let us know. Otherwise the functionality will be completely replaced by OMSimulator at a later point in time.

Change History (11)

comment:1 by Adeel Asghar, 5 years ago

Milestone: 1.14.02.0.0

I just discussed this with Lennart and it seems we need further discussion on what should be a better implementation and integration approach.

comment:2 by massimo ceraolo, 5 years ago

My university will strong need in the near future to be able to simulate composite models containing modelica models and (model-exchange) FMUs.
Currently I'm able to do this rather satisfactorily (except for minor issues, such as that in #5581)
So, please, whatever decision you make, consider keeping this functionality alive'''

Version 0, edited 5 years ago by massimo ceraolo (next)

in reply to:  1 comment:3 by Francesco Casella, 5 years ago

Replying to adeas31:

I just discussed this with Lennart and it seems we need further discussion on what should be a better implementation and integration approach.

I fully agree. The discussion should involve all the stakeholders: developers, users, OSMC members.

From my point of view, OMSimulator is by no means a replacement of this feature, I'll try to motivate why.

Modelica is a declarative modelling language with fairly sophisticated features such as a-causal connections, inheritance, replaceable classes, etc. FMI is just a standard to represent causal dynamic systems in executable form, so it is way less powerful in terms of expressiveness. As I understand OMSimulator only handles FMI, I can't see how it could be a replacement of a full-fledged Modelica simulation environment.

Consider this simple representative case: a hybrid car model built with the Vehicle Dynamics library, with replaceable suspension models and drivetrain models. The internal combustion engine model is given by an FMU because of IP issues, but everything else is done in Modelica, particularly for the flexibility of the modelling detail made possible by replaceable classes.

How would you deal with this use case using OMSimulator, in a way which is as convenient, expressive, and powerful as in the case of a Modelica models that embeds an FMU in one specific component?

The only problem I see here is that while the process of FMI export from a Modelica model is completely described by standards, I undrestand the process of FMI import is not, so it could be tool-specific, thus breaking the tool-independent modelling approach of both Modelica and FMI. This issue should be addressed by the Modelica Association at some point.

comment:4 by Francesco Casella, 5 years ago

Cc: albertoleva added

comment:5 by Andreas Heuermann, 4 years ago

Priority: highcritical

OMEdit is now using the new frontend by default and it is more or less impossible to import FMUs using omc-based FMI import because the generated Modelica code is not legal and the new frontend will reject it.
If PR#6984 is merged the same is true for the scripting API.

Users are still using the old FMI import and are having trouble with it, see e.g. issue #6995.

But the SSP support for OMEdit is very limited at the moment and using it to import FMUs is really terrible, so we don't have a working way to import FMUs via the GUI and connect them to a Modelica model at all.

comment:6 by Adeel Asghar, 4 years ago

But the SSP support for OMEdit is very limited at the moment and using it to import FMUs is really terrible, so we don't have a working way to import FMUs via the GUI and connect them to a Modelica model at all.

What is the real problem when importing FMUs?

comment:7 by Andreas Heuermann, 4 years ago

What is the real problem when importing FMUs?

  • It's not possible to edit most parts of a SSP files in OMEdit.
  • OMEdit is crashing on me all the time, I'll try to debug a bit more. Is there already a ticket for it?

That's why I can't add an example. It's taking me ages to do just a tiny example with importing CauerLowPassAnalog as FMU with SSP.

in reply to:  7 comment:8 by Adeel Asghar, 4 years ago

Replying to AnHeuermann:

What is the real problem when importing FMUs?

  • It's not possible to edit most parts of a SSP files in OMEdit.

This could be. Lennart and Arun worked on a new SSP format that includes SSV as well which might not be possible to edit from OMEdit. But in general you can edit everything from the top level model.

  • OMEdit is crashing on me all the time, I'll try to debug a bit more. Is there already a ticket for it?

Try to run it with gdb and send me a backtrace. There is no such ticket.

That's why I can't add an example. It's taking me ages to do just a tiny example with importing CauerLowPassAnalog as FMU with SSP.

Might be an issue with FMU. I can't say anything without a MWE.

comment:9 by Andreas Heuermann, 4 years ago

Try to run it with gdb and send me a backtrace. There is no such ticket.

Sorry for the late response, my Windows build of omc didn't want to build yesterday.
Here is the new ticket #6256.

comment:10 by Andreas Heuermann, 4 years ago

Why SSP is so frustrating at the moment: #6258

I'm not able to get the most basic example to run and will lose all my progress after each try.

comment:11 by Francesco Casella, 3 years ago

Note: See TracTickets for help on using tickets.