CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
429 stars 118 forks source link

[Questions] Validation and interaction with FMU for Model Exchange. #678

Closed sergiochavezlazo96 closed 3 months ago

sergiochavezlazo96 commented 3 months ago

Hello, I am working on a personal tool to export FMU's that meet my personal requirements and I have the following questions regarding FMPy:

  1. Currently, I am able to import and run my FMU's using FMPy and the FMPy validation tool for the .xml is not showing any errors. Is that enough to validate that my FMU's are valid and can be shared with other users/clients?

  2. I am generating FMU's for Model Exchange. When I import and run them with FMPy I am not giving any step time/size? Is FMPY setting that using any default? Again, the process is not showing any errors and running perfectly. I just want to understand how is the interaction with Model Exchange cases

This is the output

Screenshot 2024-06-29 at 13 01 01

Thank you so much!

t-sommer commented 3 months ago
  1. Currently, I am able to import and run my FMU's using FMPy and the FMPy validation tool for the .xml is not showing any errors. Is that enough to validate that my FMU's are valid and can be shared with other users/clients?

Simulating an FMU with FMPy (or any other tool for that matter) is neither required nor sufficient to claim FMI compatibility. However it is a good way to find potential problems.

When I import and run them with FMPy I am not giving any step time/size? Is FMPY setting that using any default?

Yes. I'd recommend to always set the step size explicitly.

You may also want to take a look at fmusim (https://github.com/modelica/reference-fmus?tab=readme-ov-file#reference-fmus).