PyFMI: A Python Package for Simulation of Coupled Dynamic Models with the Functional Mock-up Interface

With the advent of the Functional Mock-up Interface (FMI) standard, exchanging dynamic models between modeling and simulation tools has been greatly simplified. At the core of it, FMI is a standardized and unified model execution interface for dynamic models. FMI has gained widespread adoption among users and numerous commercial and open source tools implement support for the standard. In this article, the Python package PyFMI is introduced. PyFMI supports loading and execution of models compliant with the FMI standard, called Functional Mock-up Units (FMUs). It includes a master algorithm for simulation of coupled FMUs together with connections to both Assimulo, for simulation of single FMUs, and to SciPy, for performing parameter estimation. Accessing models compliant with FMI in Python, which is an open and accessible scripting language, is intended to further spread the standard and also promote and facilitate future development of the standard. This is due to Python being a convenient language for experimentation and prototyping of numerical algorithms. PyFMI is also demonstrated on a number of problems that highlights its viability for solving industrial grade simulation problems with FMUs.

[1]  Karl-Erik Årzén,et al.  Modeling and optimization with Optimica and JModelica.org - Languages and tools for solving large-scale dynamic optimization problems , 2010, Comput. Chem. Eng..

[2]  John A. Nelder,et al.  A Simplex Method for Function Minimization , 1965, Comput. J..

[3]  Other Contributors Are Indicated Where They Contribute The Free Software Foundation , 2017 .

[4]  Karl Henrik Johansson,et al.  The quadruple-tank process: a multivariable laboratory process with an adjustable zero , 2000, IEEE Trans. Control. Syst. Technol..

[5]  F. Krogh,et al.  Solving Ordinary Differential Equations , 2019, Programming for Computations - Python.

[6]  Johan Åkesson,et al.  Import and Export of Functional Mock-up Units in JModelica.org , 2011 .

[7]  Carol S. Woodward,et al.  Enabling New Flexibility in the SUNDIALS Suite of Nonlinear and Differential/Algebraic Equation Solvers , 2020, ACM Trans. Math. Softw..

[8]  Martin Otter,et al.  PySimulator - A Simulation and Analysis Environment in Python with Plugin Infrastructure , 2012 .

[9]  Travis E. Oliphant,et al.  Python for Scientific Computing , 2007, Computing in Science & Engineering.

[10]  Johan Åkesson,et al.  Derivative-free Parameter Optimization of Functional Mock-up Units , 2012 .

[11]  John D. Ramsdell,et al.  Estimation of Sparse Jacobian Matrices , 1983 .

[12]  Johan Åkesson,et al.  A Workbench for Multibody Systems ODE and DAE Solvers , 2012 .

[13]  Christian Andersson,et al.  Methods and Tools for Co-Simulation of Dynamic Systems with the Functional Mock-up Interface , 2016 .

[14]  Johan Åkesson,et al.  Assimulo: A unified framework for ODE solvers , 2015, Math. Comput. Simul..

[15]  J. Andreasson,et al.  The VehicleDynamics Library Overview and Applications , 2006 .

[16]  R. I. Leine,et al.  Nonlinear Dynamics and Modeling of Various Wooden Toys with Impact and Friction , 2003 .

[17]  E. Hairer,et al.  Solving Ordinary Differential Equations II: Stiff and Differential-Algebraic Problems , 2010 .

[18]  Stefan Behnel,et al.  Cython: The Best of Both Worlds , 2011, Computing in Science & Engineering.

[19]  Martin Arnold,et al.  Co-simulation with communication step size control in an FMI compatible master algorithm , 2012 .

[20]  James Demmel,et al.  An Asynchronous Parallel Supernodal Algorithm for Sparse Gaussian Elimination , 1997, SIAM J. Matrix Anal. Appl..

[21]  John D. Hunter,et al.  Matplotlib: A 2D Graphics Environment , 2007, Computing in Science & Engineering.

[22]  J. Åkesson,et al.  Methods and Tools for Robust Optimal Control of Batch Chromatographic Separation Processes , 2015 .