modelica / fmi-guides

Repo for "FMI Best Practice Guide for Implementers" (and maybe more guides)
https://modelica.github.io/fmi-guides/main/fmi-guide/
Other
18 stars 11 forks source link

Add content on porting FMI 2.0 implementations to FMI 3.0 #4

Open pmai opened 3 years ago

pmai commented 3 years ago

For example content like

However, just like in FMI 2.0, it could in principle also be implemented by activating the model equations only at the first event iteration and returning always newDiscreteStatesNeeded == fmi3False from <>.

Furthermore, the discrete-time <<state,states>> are not updated by <>, but as first action before the discrete-time equations are evaluated, in order that latexmath:[^{\bullet}\mathbf{x}_d] (= value at the previous Lucid Synchrone/Modelica 3.3 clock tick) and latexmath:[\mathbf{x}_d] (value at the latest Lucid Synchrone/Modelica 3.3 clock tick) have reasonable values between Lucid Synchrone/Modelica 3.3 clock ticks.

pmai commented 2 years ago

Are you kidding me? Yes we are...

Maplesoft-fmigroup commented 2 years ago

It might be helpful be to point out the change in the FMI2 capability flag completedIntegratorStepNotNeeded (default=false). In FMI3 the equivalent is needsCompletedIntegratorStep but to maintain the functionality of FMI2 it has to be set to 'true'. If the exporter doesn't notice the change in the default behaviour it could greatly affect the functionality of their FMU.