A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability

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 framewo...

Full description

Bibliographic Details
Main Authors: John Tinnerholm, Adrian Pop, Martin Sjölund
Format: Article
Language:English
Published: MDPI AG 2022-06-01
Series:Electronics
Subjects:
Online Access:https://www.mdpi.com/2079-9292/11/11/1772
_version_ 1797493664373538816
author John Tinnerholm
Adrian Pop
Martin Sjölund
author_facet John Tinnerholm
Adrian Pop
Martin Sjölund
author_sort John Tinnerholm
collection DOAJ
description 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.
first_indexed 2024-03-10T01:23:16Z
format Article
id doaj.art-c778ee5f6a084dd9bf5cfdb32e9d60f9
institution Directory Open Access Journal
issn 2079-9292
language English
last_indexed 2024-03-10T01:23:16Z
publishDate 2022-06-01
publisher MDPI AG
record_format Article
series Electronics
spelling doaj.art-c778ee5f6a084dd9bf5cfdb32e9d60f92023-11-23T13:55:42ZengMDPI AGElectronics2079-92922022-06-011111177210.3390/electronics11111772A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural VariabilityJohn Tinnerholm0Adrian Pop1Martin Sjölund2Department of Computer and Information Science, Linköping University, SE-581 83 Linköping, SwedenDepartment of Computer and Information Science, Linköping University, SE-581 83 Linköping, SwedenDepartment of Computer and Information Science, Linköping University, SE-581 83 Linköping, SwedenNowadays, 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.https://www.mdpi.com/2079-9292/11/11/1772modeling and simulationModelicaJuliamulti-modevariable structure systemsJIT
spellingShingle John Tinnerholm
Adrian Pop
Martin Sjölund
A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
Electronics
modeling and simulation
Modelica
Julia
multi-mode
variable structure systems
JIT
title A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
title_full A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
title_fullStr A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
title_full_unstemmed A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
title_short A Modular, Extensible, and Modelica-Standard-Compliant OpenModelica Compiler Framework in Julia Supporting Structural Variability
title_sort modular extensible and modelica standard compliant openmodelica compiler framework in julia supporting structural variability
topic modeling and simulation
Modelica
Julia
multi-mode
variable structure systems
JIT
url https://www.mdpi.com/2079-9292/11/11/1772
work_keys_str_mv AT johntinnerholm amodularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability
AT adrianpop amodularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability
AT martinsjolund amodularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability
AT johntinnerholm modularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability
AT adrianpop modularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability
AT martinsjolund modularextensibleandmodelicastandardcompliantopenmodelicacompilerframeworkinjuliasupportingstructuralvariability