Opened 10 years ago
Last modified 3 years ago
#3105 accepted enhancement
Parameters and variables available in FMI
Reported by: | 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 , 10 years ago
comment:2 by , 5 years ago
Milestone: | Future → 1.16.0 |
---|---|
Owner: | changed from | to
Status: | new → accepted |
comment:3 by , 5 years ago
We ware now working on this issue:
- 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.
- 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 , 5 years ago
Cc: | 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:
- @arun3688 Add the documentation above to the user's guide.
- @adeas31 Add the options above to OMEdit.
comment:8 by , 4 years ago
Milestone: | 1.17.0 → 1.18.0 |
---|
Retargeted to 1.18.0 because of 1.17.0 timed release.
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 ofModelVariables
in the contained filemodelDescription.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.