Reputation: 1074
PyFMI FMU-module method get_variable_unit() does not work on constants.
It seems to me that the PyFMI method for FMU-mouldes get_variable_unit() and _variable_description also handles constants and parameters.
I have made a package M that contains declaration of constants. Try to make it neat and declare both unit and description. When i try to get_model_variable_unit(‘model.variable’) then I get the error message “No unit was found for the variable…”. However it works as expected for get_model_variable_description().
It looks to me as a small bug.
I run JModelica 2.4 installed in the fall, i.e. the recent upgrade of PyFMI to 2.5 that came in December I do not use.
Upvotes: 1
Views: 156
Reputation: 68
This is indeed a bug in JModelica.org - see https://trac.jmodelica.org/ticket/5729.
Upvotes: 2