-
Notifications
You must be signed in to change notification settings - Fork 6
Description
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!