Since the initial release, the FMI API provides a function of the FMU that the integrator is supposed to call at the end of every completed step.
However the exact semantics, capability flags, and rules when to call this function vary between all major releases of FMI:
-
In FMI 1.0 the function is called
fmiCompletedIntegratorStep
and the function must be called by the environment after every completed step of the integrator. -
In FMI 2.0 the function is called
fmi2CompletedIntegratorStep
and it must be called at every completed step of an integrator — provided the capability flagcompletedIntegratorStepNotNeeded
is not provided or false. -
In FMI 3.0 the function is called
fmi3CompletedIntegratorStep
and it must be called after every completed step of the integrator — provided the capability flagneedsCompletedIntegratorStep
is true.
Note especially that the name and logic of the capability flag controlling whether an importing implementation needs to call the function is changed between 2.0 and 3.0:
Whereas in 1.0 the function must be called unconditionally, in 2.0 the function must be called unless the FMU actively disables this through the completedIntegratorStepNotNeeded
capability flag, and in 3.0 the function must only be called if the FMU actively requests this through the needsCompletedIntegratorStep
capability flag.
Implementers migrating between releases or supporting new ones should take this into account.