Skip to content

Implications of optimistic doStep instead of transaction #14

@CThuleHansen

Description

@CThuleHansen

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!

Metadata

Metadata

Labels

enhancementNew feature or requestquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions