Opened 5 years ago

Closed 4 years ago

#5586 closed enhancement (fixed)

FMU info

Reported by: ceraolo Owned by: lochel
Priority: normal Milestone: 1.16.0
Component: FMI Version:
Keywords: Cc:

Description (last modified by ceraolo)

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)

fbSystemPkg.fbSubSysDX.fmu (592.6 KB) - added by ceraolo 5 years ago.
fmu_properties.png (52.5 KB) - added by lochel 5 years ago.
FMU properties in OMSimulator/OMEdit

Download all attachments as: .zip

Change History (14)

Changed 5 years ago by ceraolo

comment:1 Changed 5 years ago by ceraolo

  • Description modified (diff)

comment:2 Changed 5 years ago by ceraolo

  • Description modified (diff)

comment:3 Changed 5 years ago by ceraolo

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.

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

comment:4 Changed 5 years ago by ceraolo

  • Priority changed from high to normal

comment:5 follow-up: Changed 5 years ago by lochel

I think this information is already available in OMSimulator: https://openmodelica.org/doc/OMSimulator/master/html/OMEdit.html

Changed 5 years ago by lochel

FMU properties in OMSimulator/OMEdit

comment:6 in reply to: ↑ 5 Changed 5 years ago by ceraolo

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.

comment:7 follow-up: Changed 5 years ago by lochel

You could export your Modelica models as model exchange FMUs and then create the composite model in OMSimulator.

comment:8 in reply to: ↑ 7 Changed 5 years ago by ceraolo

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

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.

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

comment:10 Changed 5 years ago by lochel

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 Changed 4 years ago by lochel

  • Milestone changed from 2.0.0 to 1.16.0
  • Status changed from new to accepted

comment:12 Changed 4 years ago by lochel

  • Resolution set to fixed
  • Status changed from accepted to 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.

Note: See TracTickets for help on using tickets.