DLR-Logo -> http://www.dlr.de
DLR Portal Home | Imprint | Contact | Deutsch
Fontsize: [-] Text [+]

Operator Overloading in Modelica 3.1

Olsson, Hans and Otter, Martin and Elmqvist, Hilding and Brück, Dag (2009) Operator Overloading in Modelica 3.1. In: Proceedings of the 7th International Modelica Conference, pp. 219-224. Linköping University Electronic Press. 7th Modelica Conference, 20.-22. Sept. 2009, Como, Italien. ISBN 978-91-7393-513-5. ISSN 1650-3740

PDF - Requires a PDF viewer such as GSview, Xpdf or Adobe Acrobat Reader

Official URL: http://www.ep.liu.se/ecp/043/


The constructor and operator overloading introduced in Modelica 3.1 is discussed. The goal is that elementary operators like “+” or “*” can be overloaded for records. This makes it possible to define and use, in a convenient way, complex numbers, polynomials, transfer functions, state space systems, etc. The chosen approach is different to other languages: (a) Only scalar operations need to be overloaded. Array operations are then automatically available, so the growth of the number of overloaded functions is avoided. (b) Automatic type casts between different data types is performed using overloaded constructor functions. Again this reduces the number of overloaded functions. (c) The approach is conservative and only allows overloading if no ambiguity is present, in order to not introduce pitfalls into the language. This is reached by basing the overloading on disjoint sets of matching functions and not on a priority match.

Document Type:Conference or Workshop Item (Speech, Paper)
Title:Operator Overloading in Modelica 3.1
AuthorsInstitution or Email of Authors
Olsson, HansDynasim
Otter, MartinMartin.Otter@DLR.de
Elmqvist, HildingDynasim
Brück, DagDynasim
Journal or Publication Title:Proceedings of the 7th International Modelica Conference
Refereed publication:Yes
In ISI Web of Science:No
Page Range:pp. 219-224
Casella, FrancescoUNSPECIFIED
Publisher:Linköping University Electronic Press
Keywords:overloading, automatic overloading of arrays, overloading without ambiguities
Event Title:7th Modelica Conference
Event Location:Como, Italien
Event Type:international Conference
Event Dates:20.-22. Sept. 2009
Organizer:The Modelica Association
HGF - Research field:Aeronautics, Space and Transport
HGF - Program:Transport
HGF - Program Themes:Terrestrial Vehicles
DLR - Research area:Transport
DLR - Program:V BF - Bodengebundene Fahrzeuge
DLR - Research theme (Project):V - Assistenz für Verkehrsteilnehmer (old)
Location: Oberpfaffenhofen
Institutes and Institutions:Institute of Robotics and Mechatronics > System Dynamics and Control (former Control Design Engineering)
Deposited By: Monika Klauer
Deposited On:08 Jan 2010 15:14
Last Modified:12 Dec 2013 20:51

Repository Staff Only: item control page

Help & Contact
electronic library is running on EPrints 3.3.12
Copyright © 2008-2012 German Aerospace Center (DLR). All rights reserved.