The OpenModelica Integrated Modeling, Simulation and Optimization Environment Peter Fritzson1, Adrian Pop1, Adeel Asghar1, Bernhard Bachmann1, Willi Braun2, Robert Braun1, Lena Buffoni1, Francesco Casella3, Rodrigo Castro6, Alejandro Danós6, Rüdiger Franke7, Mahder Gebremedhin1, Bernt Lie8, Alachew Mengist1, Kannan Moudgalya5, Lennart Ochel1, Arunkumar Palanisamy1, Wladimir Schamai9, Martin Sjölund1, Bernhard Thiele1, Volker Waurich4, Per Östlund1 1PELAB – Programming Environment Lab, Dept. of Computer and Information Science Linköping University, SE-581 83 Linköping, Sweden 2FH Bielefeld, Bielefeld, Germany 3Dept. Electronics and Information, Politecnico di Milano, Milan, Italy 4TU Dresden, Dresden, Germany 5IIT Bombay, Mumbai, India 6Dept. Computer Science, Universidad de Buenos Aires, Argentina 7ABB AG, DE-68309 Mannheim, Germany 8University of South-Eastern Norway, Porsgrunn, Norway 9Danfoss Power Solutions GmbH & Co. OHG, Offenbach, Germany [email protected], [email protected] Abstract OpenModelica have expanded enormously. The Open Source Modelica Consortium which supports the long- OpenModelica is currently the most complete open- term development of OpenModelica was created in source Modelica- and FMI-based modeling, simulation, 2007, initially with seven founding organizations. The optimization, and model-based development scope and intensity of the open source development has environment. Moreover, the OpenModelica gradually increased. At the time of this writing the environment provides a number of facilities such as consortium has fifty-three supporting organizational debugging; optimization; visualization and 3D members. The long-term vision for OpenModelica is an animation; web-based model editing and simulation; integrated and modular modeling, simulation, model- scripting from Modelica, Python, Julia, and Matlab; based development environment with additional efficient simulation and co-simulation of FMI-based capabilities such as optimization, sensitivity analysis, models; compilation for embedded systems; Modelica- requirement verification, etc., which are described in the UML integration; requirement verification; and rest of this paper. The previous overview paper about generation of parallel code for multi-ore architectures. OpenModelica was published 2005. The current paper The environment is based on Modelica and uses an intends to give a more up-to-date overview of the system extended version of Modelica for its implementation. and the vision and goals behind its development. This overview paper intends to give an up-to-date brief This paper is organized as follows. Section 2 presents description of the capabilities of the system, and the the idea of integrated environment, Section 3 the goals main vision behind its development. for OpenModelica, Section 4 an overview of the Keywords: Modelica, OpenModelica, MetaModelica, OpenModelica environment, Section 5 and its FMI, modeling, simulation, optimization, development, subsections give more details about OpenModelica and environment, compilation, embedded system, real-time its subsystems, Section 6 presents related work and Section 7 the conclusions. 1 Introduction The OpenModelica environment was the first open 2 Integrated Interactive Modeling source Modelica environment supporting the Modelica and Simulation Environments modeling language (Modelica Association 2017) An integrated interactive modeling and simulation (Fritzson 2014). Its development started in 1997 environment is a special case of programming resulting in the release of a flattening frontend for a core environments with applications in modeling and subset of Modelica 1.0 in 1998. After a pause of four simulation. Thus, it should fulfill the requirements both years, the open source development resumed in 2002. from general integrated interactive environments and An early version of OpenModelica is described in (Fritzson et al 2005). Since then the capabilities of 206 PROCEEDINGS OF THE 1ST AMERICAN MODELICA CONFERENCE DOI OCTOBER 9-10, 2018, CAMBRIDGE, MASSACHUSETTS, USA 10.3384/ECP18154206 from the application area of modeling and simulation Model and system structure parameterization mentioned in the previous section. Variant and version handling, traceability The main idea of an integrated programming environment in general is that a number of programming 3 Goals for OpenModelica support functions should be available within the same tool in a well-integrated way. This means that the The computational and simulation goals of the functions should operate on the same data and program OpenModelica tool development include, but are not limited to, the following: representations, exchange information when necessary, resulting in an environment that is both powerful and Providing a complete open source Modelica-based easy to use. An environment is interactive and industrial-strength implementation of the Modelica language, including modeling and simulation of incremental if it gives quick feedback, e.g., without re- equation-based models, system optimization, and computing everything from scratch, and maintains a additional facilities in the programming/modeling dialogue with the user, including preserving the state of environment. previous interactions with the user. Interactive Providing an interactive computational environment environments are typically both more productive and for the Modelica language. It turns out that with more fun to use than non-interactive ones. support of appropriate tools and libraries, Modelica There are many things that one wants a programming is very well suited as a computational language for environment to do for the programmer or modeler, development and execution of numerical particularly if it is interactive. Comprehensive software algorithms, e.g. for control system design and for development environments are expected to provide solving nonlinear equation systems. support for the major development phases, such as: The research related goals and issues of the Requirements analysis OpenModelica open source implementation of a Design Modelica environment include, but are not limited to, the following: Implementation Development of a complete formal specification and Maintenance reference implementation of Modelica, including A pure programming environment can be somewhat both static and dynamic semantics. Such a more restrictive and need not necessarily support early specification can be used to assist current and future phases such as requirements analysis, but it is an Modelica implementers by providing a semantic advantage if such facilities are also included. The main reference, as a kind of reference implementation. point is to provide as much computer support as possible Language design, e.g. to further extend the scope of for different aspects of systems development, to free the the language, e.g. for use in diagnosis, structural developer from mundane tasks so that more time and analysis, system identification, integrated product effort can be spent on the essential issues. development with requirement verification, etc., as Our vision for an integrated interactive modeling and well as modeling problems that require partial simulation environment is to fulfill essentially all the differential equations. requirements for general integrated interactive environments combined with the specific needs for Language design to improve abstract properties modeling and simulation environments, e.g.: such as expressiveness, orthogonality, declarativity, reuse, configurability, architectural properties, etc. Specification of requirements, expressed as documentation and/or mathematics Improved implementation techniques, e.g. to enhance the performance of compiled Modelica Design of the mathematical model code by generating code for parallel hardware. Symbolic transformations of the mathematical Improved debugging support for equation based model languages such as Modelica, to make them even A uniform general language for model design, easier to use. mathematics, and transformations Improved optimization support, with integrated Automatic generation of efficient simulation code optimization and modeling/simulation. Two kinds: Execution of simulations parameter-sweep optimization based on multiple Debugging of models simulations; direct dynamic optimization of a goal Design optimization function without lots of simulations, e.g., using collocation or multiple shooting. Evaluation and documentation of numerical experiments Easy-to-use specialized high-level (graphical) user interfaces for certain application domains. Graphical presentation DOI PROCEEDINGS OF THE 1ST AMERICAN MODELICA CONFERENCE 207 10.3384/ECP18154206 OCTOBER 9-10, 2018, CAMBRIDGE, MASSACHUSETTS, USA Visualization and animation techniques for This would get rid of the limitations of the RML interpretation and presentation of results. compiler kernel and the need to support two compilers. Integrated requirement modeling and verification Moreover, additional tools such as our Modelica support. This includes the ability to enter debugger can be based on a single compiler. requirements formalized in a kind of Modelica style, Such an ability of a compiler to compile itself is and to verify that the requirements are fulfilled for called compiler bootstrapping. This development turned selected models under certain usage scenarios. out to be more difficult and time-consuming than initially expected; moreover, developers were not The OpenModelica effort started by developing
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages14 Page
-
File Size-