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

Implications of optimistic doStep instead of transaction #14

Open
CThuleHansen opened this issue Jun 25, 2020 · 0 comments
Open

Implications of optimistic doStep instead of transaction #14

CThuleHansen opened this issue Jun 25, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@CThuleHansen
Copy link
Contributor

CThuleHansen commented Jun 25, 2020

A dostep can set the FMU back to a previous state, yet it cannot set the messages of the queue back to a previous state.
So what are the implicates of an optimistic doStep vs a transaction? Does it even matter?

Example of optimistic dostep:
master -> fmu: serialisestate
master -> fmu: step to 1
fmu -> get messages
fmu -> update outputs
fmu -> fail
master -> fmu: rollback

Result: Messages will have been lost.

Example of transaction:
master -> fmu: serialisestate
master -> fmu: step to 1
fmu -> get messages
fmu -> store in lookahead
fmu -> fail
master -> fmu: rollback

Result: Messages will have been lost, but in lookahead.

FMI-STANDRD
However, an interesting thing is, that even in step failed, it is still possible to get outputs (p. 107 of https://fmi-standard.org/downloads/): always, but if status is other than fmi2Terminated, retrieved values are useable for debugging only

Conclusion
Most likely it will not matter, whether we do one or the other.
However, I think the standard argues in favor of optimistic, as one can see whether some signals were updated or not.

These are quick thougts, any input is welcome!

@CThuleHansen CThuleHansen added the enhancement New feature or request label Jun 25, 2020
@CThuleHansen CThuleHansen added the question Further information is requested label Oct 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants