Conference article

Import and Export of Functional Mock-up Units in

Claus Führer
Department of Numerical Analysis, Lund University, Sweden

Christian Andersson
Department of Numerical Analysis, Lund University, Sweden \ Modelon AB, Sweden

Johan Åkesson
Department of Automatic Control, Lund University, Sweden \ Modelon AB, Sweden

Magnus Gäfvert
Modelon AB, Sweden

Download article

Published in: Proceedings of the 8th International Modelica Conference; March 20th-22nd; Technical Univeristy; Dresden; Germany

Linköping Electronic Conference Proceedings 63:36, p. 329-338

Show more +

Published: 2011-06-30

ISBN: 978-91-7393-096-3

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


Different simulation and modeling tools often use their own definition of how a model is represented and how model data is stored. Complications arise when trying to model parts in one tool and importing the resulting model in another tool or when trying to verify a result by using a different simulation tool. The Functional Mock-up Interface (FMI) is a standard to provide a unified model execution interface. In this paper we present an implementation of the FMI specification in the platform; where support for import and export of FMI compliant models has been added. The FMI import interface is written in Python and offers a complete mapping of the FMI C API. also offers a set of Pythonic convenience methods for interacting with the model in an object-oriented manner. In addition; a connection to the simulation environment Assimulo which is part of is offered to allow for simulation of models following the FMI specification using state of the art numerical integrators. Generation of FMI compliant models from will also be discussed.

Keywords; Assimulo; Sundials; FMI; FMUs


[1] Johan Åkesson. Optimica—an extension of modelica supporting dynamic optimization. In In 6th International Modelica Conference 2008. Modelica Association; March 2008.

[2] Johan Åkesson; Karl-Erik Årzén; Magnus Gäfvert; Tove Bergdahl; and Hubertus Tummescheit. Modeling and optimization with Optimica and—languages and tools for solving large-scale dynamic optimization problem. Computers and Chemical Engineering; 34(11):1737–1749; November 2010. doi: 10.1016/j.compchemeng.2009.11.011.

[3] Christian Andersson. A new Python-based class for simulation of complex hybrid daes and its integration in Master’s thesis; Department of Mathematics; Lund University; Sweden; 2010.

[4] Willi Braun; Bernhard Bachmann; and Sabina Pross. Synchronous events in the OpenModelica compiler with a petri net library application. In 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools; 2010.

[5] K.E. Brenan; S.L. Campbell; and L.R. Petzold. Numerical Solution of Initial-Value Problems in Differential-Algebraic Equations. Society for Industrial and Applied Mathematics; 1996.

[6] Dassault Systemes. Dymola web page; 2010.

[7] Hilding Elmqvist. A Structured Model Language for Large Continuous Systems. PhD thesis; Department of Automatic Control; Lund University; Sweden; May 1978.

[8] Jan Eriksson. A note on the decomposition of systems of sparse non-linear equations. Bit Numerical Mathematics; 16(4):462–465; 1976. doi: 10.1007/BF01932730.

[9] Python Software Foundation. ctypes: A foreign function library for Python; 2009.

[10] J. Hunter; D. Dale; and M. Droettboom. Matplotlib: Python plotting; 2010.

[11] Center for Applied Scientific Computing Lawrence Livermore National Laboratory. SUNDIALS (SUite of Nonlinear and DIfferential/ALgebraic equation Solvers); 2009.

[12] Sven Erik Mattsson and Gustaf Söderlind. Index reduction in differential-algebraic equations using dummy derivatives. SIAM J. Sci. Comput; 14(3):677–692; May 1993. doi: 10.1137/0914043.

[13] T. Oliphant. Numpy Home Page; 2009.

[14] R.E Tarjan. Depth-first search and linear graph algorithms. SIAM J. Computing; 1(2):146–160; 1972. doi: 10.1137/0201010.

[15] The Modelica Association. The Modelica Association Home Page; 2010.

[16] Johan Ylikiiskilä; Johan Åkesson; and Claus Führer. Improving Newton’s method for initialization of Modelica models. In 8th InternationalModelica Conference; 2011.

Citations in Crossref