Composer - A prototype multilingual model composition tool
Erik Billing and Martin Servin
November 10, 2012
Facing the task to design, simulate or optimize a complex system itis common to find models and data for the system expressed in differentformats, implemented in different simulation software tools. When a newmodel is developed, a target platform is chosen and existing componentsimplemented with different tools have to be converted. This results inunnecessary work duplication and lead times. The Modelica languageinitiative  partially solves this by allowing developers to move modelsbetween different tools following the Modelica standard. Another possi-bility is to exchange models using the Functional Mockup Interface (FMI)standard that allows computer models to be used as components in othersimulations, possibly implemented using other programming languages. With the Modelica and FMI standards entering development, there isneed for an easy-to-use tool that supports design, editing and simulationof such multilingual systems, as well as for retracting system informationfor formulating and solving optimization problems.A prototype solution for a graphical block diagram tool for design, edit-ing, simulation and optimization of multilingual systems has been createdand evaluated for a specific system. The tool is named Composer .The block diagram representation should be generic, independent ofmodel implementations, have a standardized format and yet support effi-cient handling of complex data. It is natural to look for solutions amongmodern web technologies, specifically HTML5. The format for represent-ing two dimensional vector graphics in HTML5 is Scalable Vector Graphics(SVG). We combine the SVG format with the FMI standard. In a firststage, we take the XML-based model description of FMI as a form for de-scribing the interface for each component, in a language independent way.Simulation parameters can also be expressed on this form, and integratedas metadata into the SVG image.
returned to the web browser where it is plotted or processed using otherstandard libraries.The ﬁber production process at SCA Packaging Obbola  is used asan example system and modeled using Composer. The system consists oftwo ﬁber production lines that produce ﬁber going to a storage tank .The paper machine is taking ﬁber from the tank as needed for production.A lot of power is required during ﬁber production and the purpose of themodel was to investigate weather electricity costs could be reduced byrescheduling ﬁber production over the day, in accordance with the electricity spot price. Components are implemented for dynamical simulationusing OpenModelica and for discrete event using Python. The Python implementation supports constraint propagation between components andoptimization over speciﬁed variables. Each component is interfaced as aFunctional Mock-up Unit (FMU), allowing components to be connectedand properties speciﬁed in language independent way. From the SVGcontaining the high-level system information, both Modelica and Pythoncode is generated and executed on the web server, potentially hosted ina high performance data center. More implementations could be addedwithout modifying the SVG system description.We have shown that it is possible to separate system descriptions onthe block diagram level from implementations and interface between thetwo levels using FMI. In a continuation of this project, we aim to integratethe FMI standard also for co-simulation, such that components implemented in diﬀerent languages could be used together. One open questionis to what extent FMUs of the same component, but implemented withdiﬀerent tools, will have the same model description. For the SVG-basedsystem description to be useful, the FMI model description must remainthe same, or at least contain a large overlap, for a single component implemented in diﬀerent languages. This will be further investigated in futurework.
 Modelica Association. Functional mock-up interface, http://www.fmi-standard.org, November 2012.
 Modelica Association. Modelica and the modelica association, http://www.modelica.org, November 2012.
 Erik Billing and Martin Servin. Composer, http://imuit.cs.umu.se/composer, November 2012.  SCA Packaging. Sca packaging obbola, http://www.scapackaging.com, November 2012.
 Patrik Törmänen and Hussein Jaffal. Reducing electricity cost - case study. Technical report, UMIT Research Lab, Umeå University, 2011.2
Umeå: Umeå universitet , 2013.