-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added functions for getting FMU metadata #17
Added functions for getting FMU metadata #17
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the tests check not just length of the result but the actually values of the results?
In general, we want to accomplish that by implementing the FMI-CrossChecks from ModelicaAssoctation. This repo is currently archived and will be replaced by a successor soon, so it will still take some time. As workaround, we are checking for simulation results/states at |
BTW: @sathvikbhagavan much appreciated! Let me know when you are ready to review/test :-) |
This PR involves the implementation of utility functions involving extracting things from modelDescription. I don't think there is any need to check the simulation. I think we are ready to review/test. |
Ah now I see what you meant, in fact you are right. The tests are only checking for the length of the name-arrays instead of checking their actual content. This is not good... I will fix this. And if it is ok @sathvikbhagavan I would rename the functions to better fit the tone of the FMI-command-set? |
I added some tests for checking the values of the arrays yesterday. But if you think more tests are required, please feel free to add them. I am fine with renaming functions according to the FMI convention. |
@sathvikbhagavan I am on merging that, do you know |
I saw the code for |
* minor changed * Bug fixes (#18) * Fix fmi2SampleDirectionalDerivative() * Fix fmi2DependenciesSupported * Adapt the old calculation for the steps * Added functions for getting FMU metadata (#17) * Added functions for getting inp, out, state names * added tests for checking values * changed fmi2GetVariableUnits to default nothing * updated fmi2GetVariableDescriptions * returns dict instead of list of dict * added tests for checking units and start values Co-authored-by: sathvikbhagavan <sathvikbhagavan@@gmail.com> * inc version * typo * typo * merged PRs * typo * sampling fix Co-authored-by: Johannes Stoljar <93336654+stoljarjo@users.noreply.github.com> Co-authored-by: sathvikbhagavan <35105271+sathvikbhagavan@users.noreply.github.com> Co-authored-by: sathvikbhagavan <sathvikbhagavan@@gmail.com>
Added functions for getting input, output, state, parameter and derivative names from FMU modelDescription.