FMI4j: A Software Package for working with Functional Mock-up Units on the Java Virtual Machine
MetadataVis full innførsel
This paper introduces FMI4j, a software package for working with Functional Mock-up Units (FMUs) on the Java Virtual Machine (JVM). FMI4j is written in Kotlin, which is 100% interoperable with Java, and consists of programming APIs for parsing the meta-data associated with an FMU, as well as running them. FMI4j is compatible with FMI version 2.0 for Model Exchange (ME) and Co-Simulation (CS). Currently, FMI4j is the only software library targeting the JVM supporting ME 2.0. In addition to provide bare-bones access to such FMUs, it provides the means for solving them using a range of bundled fixedand variable-step solvers. A command line tool named FMU2Jar is also provided, which is capable of turning any FMU into a Java library. The source code generated from this tool provides type-safe access to all FMU variables explicitly through the API (Application Programming Interface). Additionally, the API is documented with key information retrieved from the FMU meta-data, allowing essential information such as the description, causality and start value of each variable to be seamlessly exposed to the user through the Integrated Development Environment (IDE).