Resizable Arrays in Object-Oriented Modeling

Authors

  • Martin Otter DLR
  • Hilding Elmqvist Mogram AB

DOI:

https://doi.org/10.3384/ecp218189

Keywords:

Modelica, array equations, compilation

Abstract

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