231
Pontus Lidman, MathCore, Linköping, Sweden
Sven Erik Mattsson, Dynasim, Lund, Sweden
Hans Olsson, Dynasim, Lund, Sweden
Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany
Tommy Persson, Linköping University, Sweden
Levon Saldamli, Linköping University, Sweden
André Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany
Michael Tiller, Ford Motor Company, Dearborn, MI, U.S.A.
Hubertus Tummescheit, Lund Institute of Technology, Sweden
Hans-Jürg Wiesmann, ABB Corporate Research Ltd., Baden, Switzerland
E.6.2 Contributors to the Modelica Standard Library
Peter Beater, University of Paderborn, Germany
Christoph Clauß, Fraunhofer Institute for Integrated Circuits, Dresden, Germany
Martin Otter, German Aerospace Center, Oberpfaffenhofen, Germany
André Schneider, Fraunhofer Institute for Integrated Circuits, Dresden, Germany
Hubertus Tummescheit, Lund Institute of Technology, Sweden
E.6.3 Main Changes in Modelica 1.4
• Removed declare-before-use rule. This simplifies graphical user environments, because there exists no
order of declarations when components are graphically composed together.
• Refined package concept by introducing encapsulated classes and import mechanism. Encapsulated classes
can be seen as "self-contained units": When copying or moving an encapsulated class, at most the import
statements in this class have to be changed.
• Refined when-clause: The
nondiscrete keyword is removed, equations in when-clauses must have a
unique variable name on left hand side variable and the exact mapping of when-clauses to equations is
defined. As a result, when-clauses are now precisely defined without referring to a sorting algorithm and it
is possible to handle algebraic loops between when-clauses with different conditions and between when-
clauses and the continuous-time part of a model. The discrete keyword is now optional, simplifying the
library development because only one type of connector is needed and not several types which do contain or
do not contain the discrete prefix on variables. Additionally, when-clauses in algorithm sections may have
elsewhen-clauses which simplifies the definition of priorities between when-clauses.
• For replaceable declarations: allowed constraining clauses, and annotations listing suitable redeclarations.
This allows a graphical user environment to automatically build menus with meaningful choices.
• Functions can specify their derivative. This allows, e.g., the application of the Pantelides algorithm to
reduce the index of a DAE also for external functions.
• New built-in operator "rem" (remainder) and the built-in operators div, mod, ceil, floor, integer, previously
only allowed to be used in when-clauses can now be used everywhere, because state events are
automatically generated when the result value of one of these operator changes discontinuously.
• Quantity attribute also for base types Boolean, Integer, String (and not only for Real), in order to allow
abstracted variables to refer to physical quantities (e.g. Boolean i(quantity="Current") is true if current is
flowing and is false if no current is flowing).
•
final keyword also allowed in declaration, to prevent modification. Example:
model A
Real x[:];
final Integer n=size(x,1);
end A;
• Several minor enhancements, such as usage of dot-notation in modifications
(e.g.: "
A x(B.C=1,B.D=2)" is the same as "A x(B(C=1,D=2));").