Implementation of a Generic Data Retrieval API for Modelica

Michael M. Tiller · 2005

For model developers, the Modelica modeling language is a valuable tool for describing the behavior of dynamic systems. However, developing models and performing analyses as part of a large scale engineering operation involves much more than creating behavioral descriptions [1],[2]. In order to integrate modeling and simulation into a typical product development process it is necessary to extract data (e.g. product information, part geometry, controller calibrations) from external sources. This paper will describe an application programmer interface (API) for data retrieval that has been developed using the standard external function interface in Modelica. The API is composed of generic functions that can be implemented to extract data from a variety of external data sources. Such an API can be used to access data for material properties, part geometries, data tables, etc. While the interface definitions are generic, our implementation of the generic API was specifically developed to retrieve data stored in XML [3] and utilizes the libxml2 library [4] to retrieve and parse XML files containing product information. Furthermore, the API queries are performed using XPath expressions [5]. Currently, there is no standard API to allow Modelica models to retrieve information from external data sources. Hopefully this paper can demonstrate the power of such capabilities and prompt further discussion on formalizing a standard API with similar functionality.

Read the paper · More papers on PaperTik