Search code examples
modelicafmi

Is it possible to create one FMU which supports FMI 2 and FMI 3?


Reading the new FMI 3 proposal I'm wondering if it is possible to generate one FMU zip file including one compiled model which supports both FMI 2 and FMI 3?

A compiled model could contain the necessary fmi2...() and fmi3...() functions and therefore support both. But my feeling is that the XML file is not able to state that it is supporting both. Is this correct?

Thanks for an answer.


Solution

  • The FMU cannot support both in a compliant way.

    FMI 2 (including 2.0.2) should according to https://fmi-standard.org/ have a modelDescription.xml with

    <fmiModelDescription
      fmiVersion="2.0"
    

    FMI 3 https://fmi-standard.org/docs/3.0-dev/#fmiModelDescription is planned to have version "3.0" (or possibly variants of this for pre-releases and future minor versions).

    Having two different xml-files and switching between them might be possible.