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

Added support for initializing and terminating ME FMUs #295

Merged
merged 20 commits into from
Feb 25, 2025

Conversation

modelonrobinandersson
Copy link
Member

@modelonrobinandersson modelonrobinandersson commented Feb 19, 2025

  • Change log ? I am also open to wait with this until more FMI3 functionality is in place.
  • FMIL external needs to be updated since this only works with FMIL master
  • Implement terminate function, reviewer can still review the rest.

@modelonrobinandersson modelonrobinandersson self-assigned this Feb 19, 2025
@modelonrobinandersson modelonrobinandersson changed the title Added support for initializing ME FMUs Added support for initializing and terminating ME FMUs Feb 19, 2025
Copy link
Collaborator

@PeterMeisrimelModelon PeterMeisrimelModelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thus far. Aside from the comments a few things we should also add here:

  • explicit free_instance function + accompanied appropriate test.
  • fmi3_import_destroy_dllfmu & fmi3_import_free_instance call in __dealloc__. See FMI2 for the various occurrences of _allocated_dll and _allocated_fmu.
  • [Optional] Related to terminate, some tests for valid/invalid call sequences, e.g., double termiante is not valid, and the FMU will only "midly" complain, not sure if this should be an error on the PyFMI side though

@modelonrobinandersson
Copy link
Member Author

Looks great thus far. Aside from the comments a few things we should also add here:

  • explicit free_instance function + accompanied appropriate test.
  • fmi3_import_destroy_dllfmu & fmi3_import_free_instance call in __dealloc__. See FMI2 for the various occurrences of _allocated_dll and _allocated_fmu.
  • [Optional] Related to terminate, some tests for valid/invalid call sequences, e.g., double termiante is not valid, and the FMU will only "midly" complain, not sure if this should be an error on the PyFMI side though

@PeterMeisrimelModelon see d9ae5a4 and 6e58cb5

@modelonrobinandersson modelonrobinandersson merged commit b57489f into master Feb 25, 2025
2 checks passed
@modelonrobinandersson modelonrobinandersson deleted the dev-ra-6880 branch February 25, 2025 12:01
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

Successfully merging this pull request may close these issues.

2 participants