Skip to content
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

Function to check if dependencies in modelDescription.xml are correct. #9

Open
AnHeuermann opened this issue Oct 23, 2020 · 0 comments

Comments

@AnHeuermann
Copy link

Question

Hey 👋
I'm currently trying to get some FMUs from the FMI Cross Check to run with OMSimulator and basically found FMUs that have wrong dependencies in the modelDescription.xml but are otherwise fine and could be simulated if we just ignore the dependencies.

My Question: Has the fmi-library a function to validate that the dependencies in

<ModelStructure>
    <Outputs>
      [...]
    </Outputs>
    <Derivatives>
      [...]
    </Derivatives>
    <InitialUnknowns>
      [...]
    </InitialUnknowns>
  </ModelStructure>

are correct? I couldn't find one in the documentation.
If that is not possible yet would you like to add such a function? For the FMI Cross Check it could be very useful to validate modelDescription.xml's as well.

Alternative solution

OMSimualtor calls fmi2_import_get_initial_unknowns_dependencies to get the dependencies from the modelDescription.xml but computes them on it's own as well to get the number of initial unknowns. And for the given FMU those two don't match.
If fmi2_import_get_initial_unknowns_dependencies would also return the size of startIndex and dependency we can do the check our-self.

Related Issues

The FMU I want to validate can be found on GitHub: https://github.com/modelica/fmi-cross-check/tree/master/fmus/2.0/me/linux64/MapleSim/2016.2/CoupledClutches.

Related issue on OpenModelica/OMSimulator: OpenModelica/OMSimulator#838

OMSimulator is using fmi-library version 2.0.3.

beutlich pushed a commit to fmi-tools/fmi-library that referenced this issue Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant