liu.seSearch for publications in DiVA
Change search
Link to record
Permanent link

Direct link
Publications (10 of 29) Show all publications
Tinnerholm, J., Pop, A. & Sjölund, M. (2022). A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability. Electronics, 11(11), Article ID 1772.
Open this publication in new window or tab >>A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
2022 (English)In: Electronics, E-ISSN 2079-9292, Vol. 11, no 11, article id 1772Article in journal (Refereed) Published
Abstract [en]

Nowadays, industrial products are getting increasingly complex, and time-to-market is significantly shorter. Modeling and simulation tools for cyber-physical systems need to keep up with the increased complexity. This paper presents OpenModelica.jl, a modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl and supporting Variable Structured Systems. We extended the Modelica language with three new operators to support continuous-time mode-switching and reconfiguration via recompilation at runtime. Therefore, our compiler supports the Modelica language and variable structure systems via the aforementioned extensions. To our knowledge, there are no other Modelica tools available that support both standard Modelica and variable structure systems. We evaluated our framework using a standardized benchmark suite, in terms of simulation, compilation and recompilation performance. The results concerning compilation and simulation time performance were compared with the results of running the existing OpenModelica compiler with the same set of models. A custom benchmark was devised to estimate the cost in terms of recompilation when simulating variable structure systems. The performance experiments showed that OpenModelica.jl is currently about four times slower in terms of compilation time when compiling a transmission line model with tens of thousands of equations and variables. The difference in simulation performance between the two compilers was negligable. Furthermore, the impact of recompilation during the simulation was usually small compared with the simulation time for long simulations. The results are promising for a prototype, and we outline approaches to further improve both compilation and simulation performance as future research. 

Place, publisher, year, edition, pages
Basel, Switzerland: MDPI, 2022
Keywords
modeling and simulation; Modelica; Julia; multi-mode; variable structure systems; JIT
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-185557 (URN)10.3390/electronics11111772 (DOI)000808792600001 ()
Funder
Swedish Foundation for Strategic Research, LargedynVinnova, ITEA EMBRACEELLIIT - The Linköping‐Lund Initiative on IT and Mobile Communications
Note

Funding: Swedish Government via the ELLIIT project; Vinnova via the ITEA3 EMBRACE project; Swedish Strategic Research foundation (SSF)

Available from: 2022-06-07 Created: 2022-06-07 Last updated: 2022-08-01Bibliographically approved
Sjölund, M. (2021). Evaluating a Tree Diff Algorithm for Use in Modelica Tools. In: Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel (Ed.), Proceedings of the 14th International Modelica Conference: . Paper presented at 14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021 (pp. 529-537). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Evaluating a Tree Diff Algorithm for Use in Modelica Tools
2021 (English)In: Proceedings of the 14th International Modelica Conference / [ed] Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel, Linköping: Linköping University Electronic Press , 2021, p. 529-537Conference paper, Published paper (Refereed)
Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2021
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 181
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-180428 (URN)10.3384/ecp21181529 (DOI)
Conference
14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021
Available from: 2021-10-19 Created: 2021-10-19 Last updated: 2021-10-26Bibliographically approved
Tinnerholm, J., Pop, A., Andreas, H. & Sjölund, M. (2021). OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl. In: Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel (Ed.), Proceedings of the 14th International Modelica Conference: . Paper presented at 14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021 (pp. 109-117). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>OpenModelica.jl: A modular and extensible Modelica compiler framework in Julia targeting ModelingToolkit.jl
2021 (English)In: Proceedings of the 14th International Modelica Conference / [ed] Martin Sjölund, Lena Buffoni, Adrian Pop and Lennart Ochel, Linköping: Linköping University Electronic Press , 2021, p. 109-117Conference paper, Published paper (Refereed)
Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2021
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 181
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-180429 (URN)10.3384/ecp21181109 (DOI)
Conference
14th International Modelica Conference, Linköping, Sweden, September 20-24, 2021
Available from: 2021-10-19 Created: 2021-10-19 Last updated: 2021-10-26Bibliographically approved
Sjölund, M., Buffoni, L., Pop, A. & Ochel, L. (Eds.). (2021). Proceedings of 14th Modelica Conference 2021. Paper presented at 14th Modelica Conference, Linköping, Sweden, September 20-24, 2021. Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Proceedings of 14th Modelica Conference 2021
2021 (English)Conference proceedings (editor) (Refereed)
Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2021. p. 689
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-180431 (URN)10.3384/ecp21181 (DOI)
Conference
14th Modelica Conference, Linköping, Sweden, September 20-24, 2021
Available from: 2021-10-19 Created: 2021-10-19 Last updated: 2021-10-26Bibliographically approved
Fritzson, P., Pop, A., Abdelhak, K., Asghar, A., Bachmann, B., Braun, W., . . . Östlund, P. (2020). The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development. Modeling, Identification and Control, 41(4), 241-295
Open this publication in new window or tab >>The OpenModelica Integrated Environment for Modeling, Simulation, and Model-Based Development
Show others...
2020 (English)In: Modeling, Identification and Control, ISSN 0332-7353, E-ISSN 1890-1328, Vol. 41, no 4, p. 241-295Article in journal (Refereed) Published
Abstract [en]

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.

Place, publisher, year, edition, pages
Kristiansand, Norway: Norsk Forening for Automatisering, 2020
Keywords
Modelica, OpenModelica, MetaModelica, FMI, modeling, simulation, optimization, development, environment, numeric, symbolic, compilation, embedded system, real-time
National Category
Computer Engineering Computer Sciences Software Engineering
Identifiers
urn:nbn:se:liu:diva-172069 (URN)10.4173/mic.2020.4.1 (DOI)000605964400001 ()2-s2.0-85097216447 (Scopus ID)
Funder
VinnovaSwedish Foundation for Strategic ResearchELLIIT - The Linköping‐Lund Initiative on IT and Mobile Communications
Note

Funding agencies: Vinnova in the ITEA OPENPROD projectVinnova; Vinnova in the ITEA MODRIO projectVinnova; Vinnova in the ITEA OPENCPS projectVinnova; Vinnova in the ITEA EMPHYSIS projectVinnova; Vinnova in the ITEA EMBRACE projectVinnova; Vinnova RTISIM projectVinnova; Vin

Available from: 2020-12-19 Created: 2020-12-19 Last updated: 2022-06-23Bibliographically approved
Tinnerholm, J., Pop, A., Sjölund, M., Heuermann, A. & Abdelhak, K. (2020). Towards an Open-Source Modelica Compiler in Julia. In: Dr. Rui Gao and Dr. Yutaka Hirano (Ed.), Proceedings of Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020: . Paper presented at Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020 (pp. 143-151). Linköping: Linköping University Electronic Press
Open this publication in new window or tab >>Towards an Open-Source Modelica Compiler in Julia
Show others...
2020 (English)In: Proceedings of Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020 / [ed] Dr. Rui Gao and Dr. Yutaka Hirano, Linköping: Linköping University Electronic Press, 2020, p. 143-151Conference paper, Published paper (Refereed)
Abstract [en]

Recently the Julia language has become an option for scientific computing. As of 2020, efforts exist to provide libraries that emulate the equation-based modeling features provided by Modelica or otherwise provide such functionality in Julia. The issue with these approaches is that investment in standardization and libraries would be lost unless standard-complacency is guaranteed. We believe that it is possible to combine features from both by implementing such a compiler in Julia. We argue that this approach would open additional opportunities. One such being the handling of variable structure systems (VSS) within the framework of a Modelica standard-compliant compiler. The other being a proposed compiler architecture reminiscent of LLVM for equation-based object-oriented languages. Using the OpenModelica Compiler as a baseline, we verified the fidelity of our implementation by simulating a selected set of models. While there are performance penalties, we argue that improvements to the frontend would mitigate these issues.

Place, publisher, year, edition, pages
Linköping: Linköping University Electronic Press, 2020
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 174:17
Keywords
Modelica, OpenModelica, Compilers, Applied computing, Julia, Variable Structure Systems
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-185436 (URN)10.3384/ecp2020174143 (DOI)978-91-7929-775-6 (ISBN)
Conference
Asian Modelica Conference 2020, Tokyo, Japan, October 08-09, 2020
Available from: 2022-05-30 Created: 2022-05-30 Last updated: 2022-05-30
Pop, A., Östlund, P., Casella, F., Sjölund, M. & Franke, R. (2019). A New OpenModelica Compiler High Performance Frontend. In: Anton Haumer: OTH Regensburg, Germany (Ed.), Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019: . Paper presented at The 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019. Linköping
Open this publication in new window or tab >>A New OpenModelica Compiler High Performance Frontend
Show others...
2019 (English)In: Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019 / [ed] Anton Haumer: OTH Regensburg, Germany, Linköping, 2019Conference paper, Published paper (Refereed)
Abstract [en]

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.

Place, publisher, year, edition, pages
Linköping: , 2019
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 157
Keywords
OpenModelica, compiler, flattening, frontend, modelling, simulation, equation-based, scalability
National Category
Computer Systems
Identifiers
urn:nbn:se:liu:diva-154345 (URN)10.3384/ecp19157689 (DOI)9789176851227 (ISBN)
Conference
The 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019
Funder
Vinnova, 2015-03027
Available from: 2019-02-06 Created: 2019-02-06 Last updated: 2022-05-04Bibliographically approved
Fritzson, P., Pop, A., Sjölund, M. & Asghar, A. (2019). MetaModelica – A Symbolic-Numeric Modelica Language and Comparison to Julia. In: Anton Haumer: OTH Regensburg, Germany (Ed.), Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019: . Paper presented at The 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019. Linköping
Open this publication in new window or tab >>MetaModelica – A Symbolic-Numeric Modelica Language and Comparison to Julia
2019 (English)In: Proceedings of the 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019 / [ed] Anton Haumer: OTH Regensburg, Germany, Linköping, 2019Conference paper, Published paper (Refereed)
Abstract [en]

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.

Place, publisher, year, edition, pages
Linköping: , 2019
Series
Linköping Electronic Conference Proceedings, ISSN 1650-3686, E-ISSN 1650-3740 ; 157
Keywords
Modelica, MetaModelica, symbolic, Julia, meta-programming, language, compilation
National Category
Computer Systems
Identifiers
urn:nbn:se:liu:diva-154346 (URN)10.3384/ecp19157289 (DOI)978-91-7685-122-7 (ISBN)
Conference
The 13th International Modelica Conference, Regensburg, Germany, March 4–6, 2019
Funder
Vinnova, 2015-03027
Available from: 2019-02-06 Created: 2019-02-06 Last updated: 2022-05-04Bibliographically approved
Tinnerholm, J., Sjölund, M. & Pop, A. (2019). Towards introducing just-in-time compilation in a Modelica compiler. In: Association for Computing Machinery (Ed.), EOOLT '19: Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools: . Paper presented at EOOLT '19: 9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Berlin, Germany, November 5, 2019 (pp. 11-19). New York, NY, United States: ACM Press
Open this publication in new window or tab >>Towards introducing just-in-time compilation in a Modelica compiler
2019 (English)In: EOOLT '19: Proceedings of the 9th International Workshop on Equation-based Object-oriented Modeling Languages and Tools / [ed] Association for Computing Machinery, New York, NY, United States: ACM Press, 2019, p. 11-19Conference paper, Published paper (Refereed)
Abstract [en]

We are investigating ways of introducing just-in-time compilation in a standard-compliant Modelica compiler, the Open-Modelica compiler (OMC). The main motivations are enabling extensions to support dynamically varying model structure, faster compilation, and faster recompilation of models after changes. We are investigating two approaches.

The first approach is to adapt the low-level OpenModelica intermediate representation (IR) before code generation to be compatible with LLVM. In that way we can avoid generating intermediate C-code and instead generate LLVM IR in memory for just-in-time compilation (JIT).

The second approach is to translate OMC itself written in MetaModelica to Julia, and thereby gain access to the JIT capabilities of LLVM. Another benefit of the second approach is the access to the Julia ecosystem, including a rich set of libraries for numerical computing.

We have done a preliminary investigation of both approaches, with measurements on a selected sample of algorithms, and discovered that compilation-time of generated Julia code is slower compared to generating LLVM IR directly. We conclude that providing a standard-compliant Modelica compiler which supports a dynamically varying model structure is feasible and possible, and we believe that such a compiler can be provided by using Julia or MetaModelica.

Place, publisher, year, edition, pages
New York, NY, United States: ACM Press, 2019
Series
International Workshop on Equation-based Object-oriented Modeling Languages and Tools
Keywords
OpenModelica, Modelica, LLVM, Julia, MetaModelica
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:liu:diva-169770 (URN)10.1145/3365984.3365990 (DOI)9781450377133 (ISBN)
Conference
EOOLT '19: 9th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Berlin, Germany, November 5, 2019
Funder
Swedish Foundation for Strategic Research
Available from: 2020-09-18 Created: 2020-09-18 Last updated: 2021-08-18Bibliographically approved
Berger, L., Sjölund, M. & Thiele, B. (2017). Code Generation for STM32F4 Boards with Modelica Device Drivers: [Work in Progress]. In: Proceedings of the 8th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools: . Paper presented at EOOOLT 2017, 8th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, December 1, Munich, Germany (pp. 77-80). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Code Generation for STM32F4 Boards with Modelica Device Drivers: [Work in Progress]
2017 (English)In: Proceedings of the 8th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, Association for Computing Machinery (ACM), 2017, p. 77-80Conference paper, Published paper (Refereed)
Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2017
Keywords
Modelica, Embedded, STM32F4
National Category
Computer Sciences
Identifiers
urn:nbn:se:liu:diva-152480 (URN)10.1145/3158191.3158204 (DOI)978-1-4503-6373-0 (ISBN)
Conference
EOOOLT 2017, 8th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools, December 1, Munich, Germany
Available from: 2018-11-04 Created: 2018-11-04 Last updated: 2021-03-31
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0001-7638-0108

Search in DiVA

Show all publications