Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

End time in FMU is not considered #10

Open
ralph-lange opened this issue Jun 2, 2022 · 2 comments
Open

End time in FMU is not considered #10

ralph-lange opened this issue Jun 2, 2022 · 2 comments

Comments

@ralph-lange
Copy link
Collaborator

From https://stackoverflow.com/questions/72374492/one-time-fmu-execution-with-fmi-adapter:

An end time (t_end) specified in an FMU is not considered by the fmi_adapter but the FMU is being evaluated constantly, i.e., it never finishes.

@ralph-lange
Copy link
Collaborator Author

The ambition of fmi_adapter is not to implement the entire FMI standard but to support typical, straightforward use-cases with the Robot Operating System (ROS). Since ROS is mainly intended as framework and middleware for robotic systems, where the start and end of the operating time is defined externally by some UI or management system, the fmi_adapter currently does not consider an end time specified in an FMU.

I just checked the fmi-library used by the fmi_adapter but have not found a function to check for an end time in a quick search. Also, the fmi2_status_t enum does not provide a relevant value. There is a value fmi2_terminated in the fmi2_status_kind_t enum. Maybe it can be used with fmi2_capi_get_status(..). This required more investigation on my end. Do you know more?

For the time being, I added a note in the README.md that end times are currently not supported.

@chrbertsch
Copy link

chrbertsch commented Sep 16, 2022

A stop time can optionally be defined in the default experiment of an FMU, but may be ignored by the importer.
The stop time can be inquired via FMILIB functions.

FMILIB_EXPORT int fmi2_import_get_default_experiment_has_stop | ( | fmi2_import_t * | fmu | ) |  
FMILIB_EXPORT double fmi2_import_get_default_experiment_stop | ( | fmi2_import_t * | fmu | ) |  

It is unclear to me, if considering such a stop time in ROS makes sense.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants