Opened 10 years ago

Last modified 3 years ago

#3105 accepted enhancement

Parameters and variables available in FMI

Reported by: llachassagne@… Owned by: Lennart Ochel
Priority: critical Milestone:
Component: FMI Version: trunk
Keywords: Parameters, variables, results Cc: arunkumar palanisamy, Adeel Asghar

Description

Hello,

I would like to create a FMU of a model where parameters and variables don't appear in the text description, or at least where i could chose which ones will appear. I would also like to be able to chose wich parameters will appear in the result file. For instance, in Dymola, user has the possibility to chose to include all variables (or not) during FMU export.

It's critical to for us to hide some parameters when exchanging the models and to provide clear result files with only interesting variables.

Change History (9)

comment:1 by Rüdiger Franke, 10 years ago

Here is a workaround: You might want to "postprocess" the FMU anyway to remove the sources subdirectory if you want to hide something. At the same time you can just remove unwanted parameters from the list of ModelVariables in the contained file modelDescription.xml.

More generally the protection of IP sounds like an issue for the OSM Consortium, including also the treatment of encrypted Modelica libraries. OSMC members could exploit such features in their own commercial version of OpenModelica.

comment:2 by Lennart Ochel, 5 years ago

Milestone: Future1.16.0
Owner: changed from Adeel Asghar to Lennart Ochel
Status: newaccepted

comment:3 by Lennart Ochel, 5 years ago

We ware now working on this issue:

  1. All internal variables should always be hidden. OpenModelica usually introduces intermediate variables during the symbolic transformation (compilation). Those variables are of no interest for a user and will be automatically hidden.
  1. An option to hide protected (and hideResult?) variables. This new option makes it easy to hide most of the internal variables that are usually not of interest.

Besides these options, one could wrap a model in a Modelica class to define a custom interface of variables/parameters that should be exposed. The workaround from @rfranke is not recommended (because it may easily break the FMU) and will soon no longer be necessary.

comment:4 by Lennart Ochel, 5 years ago

Cc: arunkumar palanisamy Adeel Asghar added

We have now implemented a new flag to filter the exposed variables of FMUs:

-fmiFilter=none: All variables will be exposed, even variables that are introduced by the symbolic transformations. Hence, this is intended to be used for debugging.

-fmiFilter=internal: (default option) All internal variables introduced by the symbolic transformations are filtered out. Only the variables from the actual Modelica model are exposed (with minor exceptions, e.g. for state sets).

-fmiFilter=protected: All protected model variables will be filtered out in addition to -fmiFilter=internal.

-fmiFilter=blackBox: This option is used to hide everything except for inputs and outputs. Additional variables that need to be present in the modelDescription file for structrial reasons will have concealed names.

Some actions are still required before this can be closed:

  1. @arun3688 Add the documentation above to the user's guide.
  2. @adeas31 Add the options above to OMEdit.

comment:5 by Adeel Asghar, 5 years ago

I will add the flag to OMEdit soon.

comment:6 by Adeel Asghar, 5 years ago

Added the new filter options to OMEdit 2a7b500/OpenModelica.

comment:7 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:8 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:9 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.