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

Clarify allowed call sequence after fmi3Error has been returned #1936

Closed
t-sommer opened this issue Apr 15, 2024 · 1 comment · Fixed by #1940
Closed

Clarify allowed call sequence after fmi3Error has been returned #1936

t-sommer opened this issue Apr 15, 2024 · 1 comment · Fixed by #1940
Assignees

Comments

@t-sommer
Copy link
Collaborator

The Common State Machine defines that the FMU enters the Terminated state when

a function call for this instance returns fmi3Error

In the Terminated state it is still allowed to retrieve values of variables:

[If Terminated is entered because of an fmi3Error return value, retrieved values should only be used for debugging purposes.]

However the description of fmi3Error suggests that only fmi3SetFMUState, fmi3FreeInstance, or fmi3Reset may be called:

[...] The output argument values are undefined and the simulation must not be continued. [...] If a function returns fmi3Error, it is possible to restore a previously retrieved FMU state by calling fmi3SetFMUState. Otherwise fmi3FreeInstance or fmi3Reset must be called.

It is also not defined what "the simulation must not be continued" means in terms of allowed function calls.

See also #1934.

@chrbertsch
Copy link
Collaborator

FMI Design Meeting:
Pierre: I do not think this prohibits the call of the other functions ... the "otherwise ... mus be called ..." is problematic.
Torsten: eventually or immediatley
Pierre: we should spell out that it is allowed to get values. ...
Karl: The FMU might have had several problems ...
Pierre: We did not want to prohibit calls ... you can get errors. One should be able to get values e.g. for debugging ....
Torsten: there are more getXXX functions that should be clarified. What does "continue the simlation" mean?
Karl: Setting values
Pierre: in Terminate state it is well defined. We have to clarify that if you get an fmi3Error, you must go to "Terminated.
Torsten: in case of an error you enter the "Terminated" automatically with some restrictions on the call.
Pierre: we should say, the "output values of the functions are undefined" and the FMU enters the "Terminated state." It is still possible to call fmi3getFmuState
Torsten: in the other case #1934 the importer should call "Terminated" immediately, and remove restrictions.
@t-sommer : I can create a PR

t-sommer added a commit to t-sommer/fmi-standard that referenced this issue Apr 30, 2024
t-sommer added a commit that referenced this issue May 15, 2024
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 a pull request may close this issue.

2 participants