APillekeit / fmi-standard

Specification of the Functional Mock-up Interface (FMI)
https://fmi-standard.org/downloads/
Other
0 stars 3 forks source link

State machine entry point for CS fmi3 #4

Closed jbernalr closed 5 years ago

jbernalr commented 5 years ago

Please excuse if this may have been discussed before or already clarifed, but in the current version of the state machine diagram for cs fmi3: /docs/images/calling-sequence-co-simulation.svg shows the "event mode" as the entry point. However if the canHandleEarlyReturn (maybe other new features as well) feature is set to false, how should an FMU transition into StepMode, which is the only mode for 2.0 Co-Simulation? I see the following options:

There may be someone who is in favor of having a cs state machine similar to model exchange with event mode as entry point. but in this case what to do with fmi2 cs fmus?

fmi3-cs-state-machine-entry-point

jph-tavella commented 5 years ago

The question is relevant and the option two (have more than one state machine) is probably the worse. I think there is another option with UML transitions because it is possible to define guards (Boolean expressions) dynamically evaluated in order to enable/disable transitions when they are evaluated to TRUE/FALSE. The transition from InitializationMode to EventMode could then be conditionned by a guard [canHandleEarlyReturn]. This transition is then only possible when the Early Return feature is supported by the FMU. To complete the state machine, a new transition from InitializationMode to StepMode is to be Added with the opposite guard condition [not(canHandleEarlyReturn)].

jbernalr commented 5 years ago

From the discussion in Renningen 2019, the following has been decided: