Conference article

FMI4j: A Software Package for working with Functional Mock-up Units on the Java Virtual Machine

Lars Ivar Hatledal
Department of Ocean Operations and Civil Engineering, NTNU, Norway

Houxiang Zhang
Department of Ocean Operations and Civil Engineering, NTNU, Norway

Arne Styve
Department of ICT and Natural Sciences, NTNU, Norway

Geir Hovland
Department of Engineering Sciences, UiA, Norway

Download articlehttp://dx.doi.org/10.3384/ecp1815337

Published in: Proceedings of The 59th Conference on Simulation and Modelling (SIMS 59), 26-28 September 2018, Oslo Metropolitan University, Norway

Linköping Electronic Conference Proceedings 153:6, p. 37-42

Show more +

Published: 2018-11-19

ISBN: 978-91-7685-494-5

ISSN: 1650-3686 (print), 1650-3740 (online)

Abstract

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).

Keywords

FMI, Co-Simulation, Model Exchange, JVM

References

No references available

Citations in Crossref