1. |
- Fritzson, Peter, 1952-, et al.
(author)
-
The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development
- 2020
-
In: Modeling, Identification and Control. - Kristiansand, Norway : Norsk Forening for Automatisering. - 0332-7353 .- 1890-1328. ; 41:4, s. 241-295
-
Journal article (peer-reviewed)abstract
- OpenModelica is a unique large-scale integrated open-source Modelica- and FMI-based modeling, simulation, optimization, model-based analysis and development environment. Moreover, the OpenModelica environment provides a number of facilities such as debugging; optimization; visualization and 3D animation; web-based model editing and simulation; scripting from Modelica, Python, Julia, and Matlab; efficient simulation and co-simulation of FMI-based models; compilation for embedded systems; Modelica-UML integration; requirement verification; and generation of parallel code for multi-core architectures. The environment is based on the equation-based object-oriented Modelica language and currently uses the MetaModelica extended version of Modelica for its model compiler implementation. This overview paper gives an up-to-date description of the capabilities of the system, short overviews of used open source symbolic and numeric algorithms with pointers to published literature, tool integration aspects, some lessons learned, and the main vision behind its development.
|
|
2. |
- Fritzson, Peter, 1952-, et al.
(author)
-
MetaModelica – A Symbolic-Numeric Modelica Language and Comparison to Julia
- 2019
-
In: Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019. - Linköping : Linköing University Electronic Press. - 9789176851227
-
Conference paper (peer-reviewed)abstract
- The need for integrating system modeling with advanced tool capabilities is becoming increasingly pronounced. For example, a set of simulation experiments may give rise to new data that are used to systematically construct a series of new models, e.g. for further simulation and design optimization. Such combined symbolic-numeric capabilities have been pioneered by dynamically typed interpreted languages such as Lisp and Mathematica. Such capabilities are also relevant for advanced modeling and simulation applications but lacking in the standard Modelica language. Therefore, this is a topic of long-running design discussions in the Modelica Design group. One contribution in this direction is MetaModelica, that has been developed to extend Modelica with symbolic operations and advanced data structures, while preserving safe engineering practices through static type checking and a compilation-based efficient implementation. Another recent effort is Modia, implemented using the Julia macro mechanism, making it dynamically typed but also adding new capabilities. The Julia language has appeared rather recently and has expanded into a large and fast-growing ecosystem. It is dynamically typed, provides both symbolic and numeric operations, advanced data structures, and has a just-intime compilation-based efficient implementation. Despite independent developments there are surprisingly many similarities between Julia and MetaModelica. This paper presents MetaModelica and its environment as a large case study, together with a short comparison to Julia. Since Julia may be important for the future Modelica, some integration options between Modelica tools and Julia are also discussed, including a possible approach for implementing MetaModelica (and OpenModelica) in Julia.
|
|
3. |
|
|
4. |
- Kinnander, Åke, et al.
(author)
-
Industrial Evaluation of Integrated Performance Analysis and Equation Model Debugging for Equation-Based Models
- 2016
-
In: Modeling, Identification and Control. - : MIC. - 0332-7353 .- 1890-1328. ; 37:4, s. 225-236
-
Journal article (peer-reviewed)abstract
- The ease of use and the high abstraction level of equation-based object-oriented (EOO) languages such as Modelica has the drawback that performance problems and modeling errors are often hard to find. To address this problem, we have earlier developed advanced performance analysis and equation model debugging support in the OpenModelica tool. The aim of the work reported in this paper is to perform an independent investigation and evaluation of this equation model performance analysis and debugging methods and tool support on industrial models. The results turned out to be mainly positive. The integrated debugger and performance analyzer locates several kinds of errors such as division by zero, chattering, etc., and greatly facilitates finding the equations that take most of the execution time during simulation. It remains to further evaluate the performance profiler and debugger on even larger industrial models.
|
|
5. |
- Pop, Adrian, 1975-, et al.
(author)
-
A New OpenModelica Compiler High Performance Frontend
- 2019
-
In: Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019. - Linköping : Linköing University Electronic Press. - 9789176851227
-
Conference paper (peer-reviewed)abstract
- The equation-based object-oriented Modelica language allows easy composition of models from components. It is very easy to create very large parametrized models using component arrays of models. Current open-source and commercial Modelica tools can with ease handle models with a hundred thousand equations and a thousand states. However, when the system size goes above half a million (or more) equations the tools begin to have problems with scalability. This paper presents the new frontend of the OpenModelica compiler, designed with scalability in mind. The new OpenModelica frontend can handle much larger systems than the current one with better time and memory performance. The new frontend was validated against large models from the ScalableTestSuite library and Modelica Standard Library, with good results.
|
|
6. |
|
|
7. |
- Sjölund, Martin, 1984-, et al.
(author)
-
Bootstrapping a Compiler for an Equation-Based Object-Oriented Language
- 2014
-
In: Modeling, Identification and Control. - : Norwegian Society of Automatic Control. - 0332-7353 .- 1890-1328. ; 35:1, s. 1-19
-
Journal article (peer-reviewed)abstract
- What does it mean to bootstrap a compiler, and why do it? This paper reports on the first bootstrapping of a full-scale EOO (Equation-based Object-Oriented) modeling language such as Modelica. Bootstrapping means that the compiler of a language can compile itself. However, the usual application area for the Modelica is modeling and simulation of complex physical systems. Fortunately it turns out that with some minor extensions, the Modelica language is well suited for the modeling of language semantics. We use the name MetaModelica for this slightly extended Modelica. This is a prerequisite for bootstrapping which requires that the language can be used to model and/or implement itself. The OpenModelica Compiler (OMC) has been written in this MetaModelica language. It originally supported only the standard Modelica language but has been gradually extended to also cover the MetaModelica language extensions. After substantial work, OMC is able to quickly compile itself and produces an executable with good performance. The benefits include a more extensible and maintainable compiler by introducing improved language constructs and a more powerful runtime that makes it easy to add functionality such as parser generators, debuggers, and profiling tools. Future work includes extracting and restructuring parts of OMC, making the compiler smaller and more modular and extensible. This will also make it easier to interface with OMC, making it possible to create more powerful and user-friendly OpenModelica-based tools. The compiler and its bootstrapping is a major effort -- it is currently about 330 000 lines of code, and the MetaModelica extensions are used routinely by approximately ten developers on a daily basis.
|
|
8. |
|
|
9. |
- Sjölund, Martin, 1984-, et al.
(author)
-
Integrated Debugging of Equation-Based Models
- 2014
-
In: Proceedings of the 10th International Modelica Conference. - : Linköping University Electronic Press. - 9789175193809 ; , s. 195-204
-
Conference paper (peer-reviewed)abstract
- The high abstraction level of equation-based object-oriented languages (EOO) such as Modelica has the drawback that programming and modeling errors are often hard to find. In this paper we present the first integrated debugger for equation-based languages like Modelica; which can combine static and dynamic methods for run-time debugging of equation-based Modelica models during simulations. This builds on and extends previous results from a transformational static equation debugger and a dynamic debugger for the algorithmic subset of Modelica.
|
|
10. |
- Sjölund, Martin, 1984-
(author)
-
Tools and Methods for Analysis, Debugging, and Performance Improvement of Equation-Based Models
- 2015
-
Doctoral thesis (other academic/artistic)abstract
- Equation-based object-oriented (EOO) modeling languages such as Modelica provide a convenient, declarative method for describing models of cyber-physical systems. Because of the ease of use of EOO languages, large and complex models can be built with limited effort.However, current state-of-the-art tools do not provide the user with enough information when errors appear or simulation results are wrong. It is of paramount importance that such tools should give the user enough information to correct errors or understand where the problems that lead to wrong simulation results are located. However, understanding the model translation process of an EOO compiler is a daunting task that not only requires knowledge of the numerical algorithms that the tool executes during simulation, but also the complex symbolic transformations being performed.As part of this work, methods have been developed and explored where the EOO tool, an enhanced Modelica compiler, records the transformations during the translation process in order to provide better diagnostics, explanations, and analysis. This information is used to generate better error-messages during translation. It is also used to provide better debugging for a simulation that produces unexpected results or where numerical methods fail.Meeting deadlines is particularly important for real-time applications. It is usually essential to identify possible bottlenecks and either simplify the model or give hints to the compiler that enable it to generate faster code. When profiling and measuring execution times of parts of the model the recorded information can also be used to find out why a particular system model executes slowly.Combined with debugging information, it is possible to find out why this system of equations is slow to solve, which helps understanding what can be done to simplify the model. A tool with a graphical user interface has been developed to make debugging and performance profiling easier. Both debugging and profiling have been combined into a single view so that performance metrics are mapped to equations, which are mapped to debugging information.The algorithmic part of Modelica was extended with meta-modeling constructs (MetaModelica) for language modeling. In this context a quite general approach to debugging and compilation from (extended) Modelica to C code was developed. That makes it possible to use the same executable format for simulation executables as for compiler bootstrapping when the compiler written in MetaModelica compiles itself.Finally, a method and tool prototype suitable for speeding up simulations has been developed. It works by partitioning the model at appropriate places and compiling a simulation executable for a suitable parallel platform.
|
|