OMSimulator icon indicating copy to clipboard operation
OMSimulator copied to clipboard

Empty source in SSD

Open robha67 opened this issue 2 years ago • 5 comments

Prepare to allow for reference to "incomplete" or empty sources (FMUs) in SSD. With incomplete I mean, for example, an FMU without binaries only containing a ModelDescription file. If such an FMU is referenced, there should be a warning communicated to the user

robha67 avatar Apr 04 '22 07:04 robha67

@robha67 offcourse we could improve the error messages, but we have reasonable error message already available see below

error:   [fmiLogger] module FMILIB: Could not change to the DLL directory C:/OPENMODELICAGIT\fmpy\test-lchinyyg\temp\0001_tank1\binaries\win64\
error:   [fmiLogger] module FMILIB: The FMU contains no binary for this platform.
error:   [instantiate] Could not load "resources/0001_tank1.fmu" which is associated with "test.Root.tank1"; it may be corrupted or may not support your platform

arun3688 avatar Jun 07 '22 12:06 arun3688

Yes but I mean that it should be possible to create an incomplete SSD that can be read in, for example, an architecting tool. So the SSD should be created even though the FMU is missing.

robha67 avatar Jun 07 '22 13:06 robha67

You can import an fmu as long as the model description is available. That's because we need to know the inputs/outputs to create the architecture model. The binaries are only needed for simulation purpose. It seems that this is already working, or did you encounter a problem/bug that we are not aware of? 😊

lochel avatar Jun 07 '22 19:06 lochel

@robha67 what is an incomplete SSD, could you give an example

arun3688 avatar Jun 07 '22 19:06 arun3688

If what @lochel states above works then I believe that I am almost happy. Incomplete SSD is not what I meant :) It should read incomplete SSP. I guess the remaining part of the use-case would be to create a "complete" SSD file only based on the oms.addConnection statments. Let's say that one of the fmus (binary and ModelDescription) does not exist yet but you still want to express the composite model interfaces. And based on that interface you later want to create a ModelDescription file that you can import in OpenModelica to later populate with components from, for example, MSL and finalöy export an fmu that you can insert into your SSP. Does this make sense?

robha67 avatar Jun 08 '22 06:06 robha67