Opened 5 years ago
Closed 5 years ago
#5586 closed enhancement (fixed)
FMU info
Reported by: | massimo ceraolo | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | normal | Milestone: | 1.16.0 |
Component: | FMI | Version: | |
Keywords: | Cc: |
Description (last modified by )
Consider the enclosed FMU. When loaded from Dymola the following very comprehensive info is available (consider that the original formatting is much better than the one here, where I put text only):
ModelDescription Attributes fmiVersion = 2.0 modelName = fbSystemPkg.fbSubSysDX generationTool = OpenModelica Compiler v1.14.0-dev-234-g5ef43cce8 (64-bit) generationDateAndTime = 2019-07-12T16:10:42Z Model Exchange Attributes needsExecutionTool = false completedIntegratorStepNotNeeded = false canBeInstantiatedOnlyOncePerProcess = false canNotUseMemoryManagementFunctions = false canGetAndSetFMUstate = false canSerializeFMUstate = false providesDirectionalDerivative = false Extends from fmuIcon. Parameters Type Name Default Description Real _PI_x_start 0.0 Real PI_T 1.0 Time Constant (T>0 required) Real PI_k 1.0 Gain Real PI_x_start 0.0 Initial or guess value of state Real PI_y_start 0.0 Initial value of output Real inertia1_J 0.1 Moment of inertia Init PI_initType PI_initType(fixed=false) Type of initialization (1: no init, 2: steady state, 3: initial state, 4: initial output) Boolean torque1_useSupport torque1_useSupport(fixed=fal... = true, if support flange enabled, otherwise implicitly grounded Start values for inputs Real _PIu_start 0.0 FMI Instance name String fmi_instanceName "fbSystemPkg_fbSubSysDX_fmu" Enable logging Boolean fmi_loggingOn false Instantiation String fmi_resourceLocation "file:///" + ModelicaService... Connectors Type Name Description input RealInput PIu output RealOutput w Name: fbSystemPkg_fbSubSysDX_fmu Path: fbSystemPkg_fbSubSysDX_fmu Filename: C:/Users/Massimo Ceraolo/Documents/Dymola/fbSystemPkg_fbSubSysDX_fmu.mo
On the opposite side, if the same fmu is loaded in OM, and one asks "information" from the context menu no information at all is shown (except the name).
In think it would be useful to have some info available, at least the Model Description attributes and Model Exchange attributes.
Attachments (2)
Change History (14)
by , 5 years ago
Attachment: | fbSystemPkg.fbSubSysDX.fmu added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
comment:4 by , 5 years ago
Priority: | high → normal |
---|
follow-up: 6 comment:5 by , 5 years ago
I think this information is already available in OMSimulator: https://openmodelica.org/doc/OMSimulator/master/html/OMEdit.html
comment:6 by , 5 years ago
Replying to lochel:
I think this information is already available in OMSimulator: https://openmodelica.org/doc/OMSimulator/master/html/OMEdit.html
Good! I didn't check this earlier.
So we just need to show this info also when an FMU-ME is used in conjunction with Modelica models. It could be shown when right-clicking on the fmu in the Libraries Browser, and choosing "information", or, copying OMSimulator's way, through the "proprieties" command.
Indeed I understand that OMSimulator is only for co-simulation, while I need to exchange modelica models with other simulator tools and therefore need to create, and test in OMEdit, FMU-ME's.
follow-up: 8 comment:7 by , 5 years ago
You could export your Modelica models as model exchange FMUs and then create the composite model in OMSimulator.
comment:8 by , 5 years ago
Replying to lochel:
You could export your Modelica models as model exchange FMUs and then create the composite model in OMSimulator.
Frankly, I don't know how to do this: the OMSimulator users guide is too concise to understand this, at least for me.
E.g., When I try to import in the only way I know, a FMU-ME (for instance, into "submodel") I get the following message:
[9] 22:49:52 Scripting Error [NewComponent] FMU "submodel" doesn't support co-simulation mode.
On the contrary, I feel at ease in miximg FMU-ME with modelica models directly from OMEdit standard diagram page.
I hope this feature is not going to be dropped! Mixing FMUs and Modelica models is very useful and important for me.
AFAIK this is not possible in OMSimulator. If it is, still I kindly ask not to drop the possibility of combining FMU-ME and standard modelica models in ordinary OMEdit diagrams, at least up to when the OMSimulator user's guide describes how to do the same thing in OMSimulator.
Thanks.
comment:9 by , 5 years ago
Just a small addition to my comment 8.
I think that it is an expected feature of a FMU-capable Modelica tool to be able to simulate mixed Modelica-FMU systems from within it (i.e., in our case, without resorting to OMSimulator).
Otherwise simulation of models such as Modelica.Electrical.Examples.GenerationOfFMUs would be just partial.
If this is true, allowing the FMU info to be displayed also from Modelica diagrams would be a really useful enhancement.
comment:10 by , 5 years ago
This is basically a matter of integration. We plan to improve the integration of OMSimulator into OMEdit and to use it for all (FMI-based) simulations. However, this is work in progress and we also need to provide better documentation.
comment:11 by , 5 years ago
Milestone: | 2.0.0 → 1.16.0 |
---|---|
Status: | new → accepted |
comment:12 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
The requested functionality is now available. All the model information is accessible from OMEdit. We will continue to improve the user interface - however, I consider this issue as solved.
@ceraolo I am focusing on the FMI export for the 1.16.0 release and look forward to your feedback.
well,
I' not an expert of FMUs and I don't exactly know the meaning of the reported Model Exchange attributes.
I have plans for make my team going a bit deeper into them, that's why I'm interested in these things.
However I've verified today that those parameters (needsExecutionTool, completedIntegratorStepNotNeeded,
canBeInstantiatedOnlyOncePerProcess, etc.) are currently not under the user control when creating FMus from OM, since they cannot be passed as parameters to buildModelFMU(), so it's not very important to include their value in the fmu info.
So this ticket loses part of its interest. I still believe that some basic info should be available, at least fmiVersion, whether the fmu is ME, CS or ME_CS, modelName, generationTool , generationDateAndTime.