首页> 外文会议>ECOOP'98 - Object-Oriented programming >Modelica - A Unified Object-Oriented Language for System Modeling and Simulation
【24h】

Modelica - A Unified Object-Oriented Language for System Modeling and Simulation

机译:Modelica-用于系统建模和仿真的统一的面向对象语言

获取原文
获取外文期刊封面目录资料

摘要

A new language called Modelica for hierarchical physical modeling is developed through an international effort. Modelica 1.0 was announced in September 1997. It is an object-oriented language for modeling of physical systems for the purpose of efficient simulation. The language unifies and generalizes previous object-oriented modeling languages. Compared with the widespread simulation languages available today this language offers three important advances: 1) non-causal modeling based on differential and algebraic equations; 2) multidomain modeling capability, i.e. it is possible to combine electrical, mechanical, thermody-namic, hydraulic etc. model components within the same application model; 3) a general type system that unifies object-orientation, multiple inheritance, and templates within a single class construct.A class in Modelica may contain variables (i.e. instances of other classes), equations and local class definitions. A function (method) can be regarded as a special case of local class without equations, but including an algorithm section. The equation-based non-causal modeling makes Modelica classes more reusable than classes in ordinary object-oriented languages. The reason is that the class adapts itself to the data flow context where it is instantiated and connected. The multi-domain capability is partly based on a notion of connectors, i.e. certain class members that can act as interfaces (ports) when connecting instantiated objects. Connectors themselves are classes just like any other entity in Modelica. Simulation models can be developed using a graphical editor for connection diagrams. Connections are established just by drawing lines between objects picked from a class library.The Modelica semantics is defined via translation of classes, instances and connections into a flat set of constants, variables and equations. Equations are sorted and converted to assignment statements when possible. Strongly connected sets of equations are solved by calling a symbolic and/or numeric solver. The generated C/C++ code is quite efficient.In this paper we present the Modelica language with emphasis on its class construct and type system. A few short examples are given for illustration and compared with similar constructs in C++ and Java when this is relevant.
机译:通过国际努力,开发了一种称为Modelica的用于分层物理建模的新语言。 Modelica 1.0于1997年9月发布。它是一种面向对象的语言,用于对物理系统进行建模,以进行有效的仿真。该语言统一并概括了以前的面向对象的建模语言。与当今广泛使用的仿真语言相比,该语言具有三个重要的进步:1)基于微分和代数方程的非因果建模; 2)多领域建模能力,即可以在同一应用程序模型中组合电气,机械,热力学,液压等模型组件; 3)通用类型系统,它在单个类构造中统一了面向对象,多个继承和模板。 Modelica中的类可能包含变量(即其他类的实例),方程式和局部类定义。函数(方法)可以被视为局部类的特例,不带方程式,但包含一个算法部分。基于方程的非因果建模使Modelica类比普通的面向对象语言中的类具有更高的可重用性。原因是该类使自己适应于实例化和连接的数据流上下文。多域功能部分基于连接器的概念,即某些类成员在连接实例化对象时可以充当接口(端口)。就像Modelica中的任何其他实体一样,连接器本身也是类。可以使用用于连接图的图形编辑器来开发仿真模型。仅通过在从类库中选取的对象之间画线就可以建立连接。 Modelica语义是通过将类,实例和连接转换为一组常量,变量和方程式来定义的。对方程进行排序,并在可能的情况下将其转换为赋值语句。通过调用符号和/或数字解算器可解结强连接的方程组。生成的C / C ++代码非常有效。 在本文中,我们介绍Modelica语言,重点是其类构造和类型系统。给出了一些简短的示例进行说明,并在相关时将其与C ++和Java中的类似构造进行比较。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号