DLR-Logo -> http://www.dlr.de
DLR Portal Home | Imprint | Privacy Policy | 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.


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.

Item URL in elib:https://elib.dlr.de/62366/
Document Type:Conference or Workshop Item (Speech, Paper)
Title:Operator Overloading in Modelica 3.1
AuthorsInstitution or Email of AuthorsAuthor's ORCID iD
Olsson, HansDynasimUNSPECIFIED
Otter, MartinMartin.Otter (at) DLR.deUNSPECIFIED
Elmqvist, HildingDynasimUNSPECIFIED
Brück, DagDynasimUNSPECIFIED
Journal or Publication Title:Proceedings of the 7th International Modelica Conference
Refereed publication:Yes
Open Access:Yes
Gold Open Access:No
In ISI Web of Science:No
Page Range:pp. 219-224
EditorsEmailEditor's ORCID iD
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 (old)
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 (until 2012) > System Dynamics and Control (former Control Design Engineering)
Deposited By: Klauer, Monika
Deposited On:08 Jan 2010 15:14
Last Modified:31 Jul 2019 19:26

Repository Staff Only: item control page

Help & Contact
electronic library is running on EPrints 3.3.12
Website and database design: Copyright © German Aerospace Center (DLR). All rights reserved.