Closed rokil closed 3 years ago
If required I can send an example fmu via mail.
Yes, please mail them to torsten.sommer@3ds.com. I will attach them to this issue.
The variables in the modelDescription.xml
represent the structure of the generated code which is different from the original model.
To remove parameters from the XML you can inline the parameters using the options in Configuration Paramters > Optimization > Signals and Paramters
or list the parameters to include in the XML in Configuration Paramters > Code Generation > FMI > Visible parameters
.
You are right, inlining and configuring all parameters as tunable seems to be a viable option. (I want all the parameter variables I created to be visible.) I am not sure whether there are any other side-effects of inlining and selecting all parameters as tunable, compared to keeping the global setting "tunable". Do you consider inlining a default setting for grtfmi which should always be done?
Do you consider inlining a default setting for grtfmi which should always be done?
If you don't want to access these parameters you should consider inlining them, especially for larger models.
When exporting to an grtfmi (2.7) FMU, and not using the Inline Parameters option in the Simulink model properties, then additional parameters appear in the generated modelDescription.xml which are not found in the Simulink model. They seem to be helper variables created by Simulink to handle block parameters.
Which parameters they belong to can only be identified by guessing, as they have nothing in common with the original parameter names. So the naming of these pooled, Size and maxIndex parameters (see examples below) is very ambiguous and their use is not clear to me. If they have some use to a user of the FMU, can their naming be fixed so that they are identifiable? If not, can they be removed from the modelDescription.xml?
Examples:
I created two blocks which both use the same parameter variable MyArray of size 1x3. Two additional parameters named pooled9 appear that seem to reflect the array parameter's size.
I created an S-Function block named MyBlockName with a parameter myScalarParameter. Two additional parameters named MyBlockName_P5_Size appear that seem to reflect the parameter's size.
If required I can send an example fmu via mail. Uploading (even with zip extension) failed here.