Resizable Arrays in Object-Oriented Modeling
DOI:
https://doi.org/10.3384/ecp218189Keywords:
Modelica, array equations, compilationAbstract
The Modelica language (Modelica.org) makes it easy to buildlarge, complex models by allowing the instantiation ofreusable component models. Modelica tools typically expandarrays of variables, equations and components and performsymbolic transformations on the scalar elements. Thisreduces the efficiency of the translation process and makesit difficult to change array dimensions after translation.Scalarization can be avoided by imposing certainrestrictions on the way models are written. This paperdescribes such restrictions, and the algorithms needed tobe applied during the translation. As a result, arrays areresizable after translation and also during simulation.Several examples demonstrate the approach with the Web AppModiator. As a side effect, it is also shown how to providemeaningful diagnostics for erroneous models.Downloads
Published
2025-10-24
Issue
Section
Papers
License
Copyright (c) 2025 Martin Otter, Hilding Elmqvist

This work is licensed under a Creative Commons Attribution 4.0 International License.