Research indexJournal article
API for Accessing OpenModelica Models from Python
Lie, Bajrachary, Mengist and 6 others
Linköping electronic conference proceedings19 Dec 2018Open access
NobleIDark:/48914/w1/20260522/DFADA505DOI10.3384/ecp17142707
API for Accessing OpenModelica Models from Python
Lie, Bajrachary, Mengist and 6 others · Linköping electronic conference proceedings · 2018
NobleIDark:/48914/w1/20260522/DFADA505DOI10.3384/ecp17142707
Abstract
This paper describes a new API for operating on Modelica models in Python, through OpenModelica. Modelica is an object oriented, acausal language for describing dynamic models in the form of Differential Algebraic Equations. Modelica and various implementations such as OpenModelica have limited support for model analysis, and it is of interest to integrate Modelica code with scripting languages such as Python, which facilitate the needed analysis possibilities. The API is based on a new class Mod-elicaSystem within package OMPython of OpenModelica, with methods that operate on instantiated models. Emphasis has been put on specification of a systematic structure for the various methods of the class. A simple case study involving a water tank is used to illustrate the basic ideas.