Improved Unit Inference and Checking in Modelica
2025-09-09 , 202

This paper will present a new unified algorithm for unit checking and inference, and showing the benefits for various libraries.

The Modelica Language supports declaring units for variables using the SI-standard. This allows dimensional checking to detect possible errors in equations. The units for variables make it easier to interpret, input and plot their values. When we infer the unit of a variable we get the same benefits also for variables without a declared unit. We will use unit inference and checking for the combination, even if the check is primarily a dimensional check.

Both dimensional checking and unit inference are already implemented in several Modelica tools, but not consistently. The original motivation for this paper was to understand the different approaches, and demystify the unit handling with the goal of making it more available. Based on that understanding this paper will also present a new unified algorithm combining the different strengths, and showing the results for various libraries.


Session Chair Bernhard Bachmann


Paper PDF: 16thmodelicafmiconference/question_uploads/paper_8_MOBTLeA.pdf

-1998 Ph.D. in Numerical Analysis from Lund Institute of Technology 1998 "Runge-Kutta Solution of Initial Value Problems - Methods, Algorithms and Implementation".

1999- Worked at Dassault Systemes AB (earlier Dynasim) with Modelica and Dymola.

2018- Chair of MAP-Lang (Modelica Language).

This speaker also appears in: