Opened 5 years ago

Last modified 2 years ago

#5345 new enhancement

omc-based FMI import in OMEdit

Reported by: lochel Owned by: adeas31
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 follow-up: Changed 5 years ago by adeas31

  • Milestone changed from 1.14.0 to 2.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 Changed 5 years ago by ceraolo

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'''

Reading the current OMSimulator documentation it seems to me that this is currently impossible. If this is true, deleting omc-based FMI import in OMEdit would cause my university serious issues.

Last edited 5 years ago by ceraolo (previous) (diff)

comment:3 in reply to: ↑ 1 Changed 5 years ago by casella

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 Changed 5 years ago by casella

  • Cc albertoleva added

comment:5 Changed 3 years ago by AnHeuermann

  • Priority changed from high to critical

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 Changed 3 years ago by adeas31

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 follow-up: Changed 3 years ago by AnHeuermann

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.

comment:8 in reply to: ↑ 7 Changed 3 years ago by adeas31

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 Changed 3 years ago by AnHeuermann

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 Changed 3 years ago by AnHeuermann

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 Changed 2 years ago by casella

Note: See TracTickets for help on using tickets.