Skip to content

Commit

Permalink
Remove Trailing WhiteSpace (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Jun 4, 2019
1 parent 1381e81 commit 6aab90d
Show file tree
Hide file tree
Showing 23 changed files with 466 additions and 466 deletions.
26 changes: 13 additions & 13 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ \section{Annotations for Code Generation}\doublelabel{annotations-for-code-gener
\section{Annotations for Simulation Experiments}\doublelabel{annotations-for-simulation-experiments}
\begin{lstlisting}[language=grammar]
experiment-annotation:
annotation "(" "experiment" [ "(" [experimentOption
annotation "(" "experiment" [ "(" [experimentOption
{"," experimentOption}] ")" ] ")"

experimentOption:
Expand Down Expand Up @@ -438,7 +438,7 @@ \subsubsection{Graphical Properties}\doublelabel{graphical-properties}
invisible line, and the other attributes various forms of dashed/dotted
lines.

The \lstinline!FillPattern! attributes \lstinline!Horizontal!, \lstinline!Vertical!,
The \lstinline!FillPattern! attributes \lstinline!Horizontal!, \lstinline!Vertical!,
\lstinline!Cross!, \lstinline!Forward!,
\lstinline!Backward! and \lstinline!CrossDiag! specify fill patterns drawn with the line color
over the fill color.
Expand Down Expand Up @@ -538,7 +538,7 @@ \subsection{Component Instance}\doublelabel{component-instance}
record Placement
Boolean visible = true;
Transformation transformation "Placement in the diagram layer";

Boolean iconVisible "Visible in icon layer; for public connector";
Transformation iconTransformation "Placement in the icon layer; for public connector";
end Placement;
Expand Down Expand Up @@ -568,7 +568,7 @@ \subsection{Component Instance}\doublelabel{component-instance}

\subsection{Extends clause}\doublelabel{extends-clause}

Each extends-clause (and short-class-definition, as stated in \autoref{annotations-for-graphical-objects})
Each extends-clause (and short-class-definition, as stated in \autoref{annotations-for-graphical-objects})
may have layer specific annotations which describe
the rendering of the base class' icon and diagram layers in the
subclass.
Expand Down Expand Up @@ -656,18 +656,18 @@ \subsection{Connections}\doublelabel{connections1}
\end{lstlisting}

The \lstinline!index! is one of the points of Line (numbered 1, 2, 3, \ldots{} where
negative numbers count from the end, thus -1 indicate the last one). The \lstinline!string!
negative numbers count from the end, thus -1 indicate the last one). The \lstinline!string!
may use the special
symbols ``\%first'' and ``\%second'' to indicate the connectors in the
connect-equation.

The \lstinline!extent! and \lstinline!rotation! are relative to the \lstinline!origin! (default \lstinline!{0,0}!)
The \lstinline!extent! and \lstinline!rotation! are relative to the \lstinline!origin! (default \lstinline!{0,0}!)
and the \lstinline!origin! is relative to the point on the Line.

The textColor attribute defines the color of the text. The text is drawn
with transparent background and no border around the text (and without
outline). The contents inherited from FilledShape is deprecated.
The default value for \lstinline!horizontalAlignment! is deprecated.
The default value for \lstinline!horizontalAlignment! is deprecated.
Having a zero size for the extent is deprecated and is handled as if upper part is moved up an appropriate amount.

{[}\emph{Example:}
Expand All @@ -678,7 +678,7 @@ \subsection{Connections}\doublelabel{connections1}
{-25,-65}}));
\end{lstlisting}
\emph{Draws a connection line and adds the text ''axisControlBus1''
ending at \{-6, 3\}+\{-25, -65\} and 4 vertical units of space for the text.
ending at \{-6, 3\}+\{-25, -65\} and 4 vertical units of space for the text.
Using a height of zero, such as \lstinline!extent=[-6,3; -6,3]! is deprecated, but gives similar result.}
{]}

Expand Down Expand Up @@ -787,7 +787,7 @@ \subsubsection{Ellipse}\doublelabel{ellipse}
ignored).

The default closure is \lstinline!EllipseClosure.Chord! when \lstinline!startAngle! is 0 and
\lstinline!endAngle! is 360, or \lstinline!EllipseClosure.Radial! otherwise.
\lstinline!endAngle! is 360, or \lstinline!EllipseClosure.Radial! otherwise.
\emph{{[}The
default for a closed ellipse is not} \lstinline!EllipseClosure.None!\emph{, since that
would result in} \lstinline!fillColor! and \lstinline!fillPattern! \emph{being ignored, making it
Expand Down Expand Up @@ -1184,7 +1184,7 @@ \section{Annotations for the Graphical User Interface}\doublelabel{annotations-f
The value of the connectorSizing annotation must be a literal
\lstinline!false! or \lstinline!true! value {[}\emph{since if the value is an
expression, the connectorSizing functionality is conditional and this
will then lead easily to wrong models}{]}. If \lstinline!connectorSizing = false!, this annotation has no effect.
will then lead easily to wrong models}{]}. If \lstinline!connectorSizing = false!, this annotation has no effect.
If \lstinline!connectorSizing = true!, the corresponding variable must be declared with the
\lstinline!parameter! prefix, must be a subtype of a scalar Integer and
must have a literal default value of zero {[}\emph{since this annotation
Expand Down Expand Up @@ -1520,7 +1520,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}

\paragraph*{convertElement("OldClass","OldName","NewName")}\doublelabel{convertelementoldclassoldnamenewname}

In \lstinline!OldClass! convert element \lstinline!OldName! to \lstinline!NewName!.
In \lstinline!OldClass! convert element \lstinline!OldName! to \lstinline!NewName!.
Both \lstinline!OldName! and \lstinline!NewName!
normally refer to components -- but they may also refer to
class-parameters, or hierarchical names. For hierarchical names the
Expand All @@ -1539,7 +1539,7 @@ \subsubsection{Conversion rules}\doublelabel{conversion-rules}
are multiple \lstinline!OldModifier! and not all are set in the component instance.

If \lstinline!simplify! is specified and true then perform obvious simplifications
to clean up the new modifier; otherwise leave as is.
to clean up the new modifier; otherwise leave as is.
\begin{nonnormative}
Note: \lstinline!simplify! is primarily intended for converting enumerations and emulated
enumerations that naturally lead to large nested if-expressions. The
Expand Down Expand Up @@ -1602,7 +1602,7 @@ \subsection{Mapping of Versions to File System}\doublelabel{mapping-of-versions-
The directory \lstinline!IDENT! {[}\emph{Example:} \lstinline!Modelica!{]} with the file
package.mo directly inside it
\item
The directory \lstinline!IDENT " " VERSION-NUMBER! {[}\emph{Example:}
The directory \lstinline!IDENT " " VERSION-NUMBER! {[}\emph{Example:}
\lstinline!Modelica 2.1!{]} with the file package.mo directly inside it
\end{itemize}

Expand Down
22 changes: 11 additions & 11 deletions chapters/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ \subsection{Array Dimension and Size Functions}\doublelabel{array-dimension-and-
\hline
\emph{Modelica} & \emph{Explanation}\\ \hline
\endhead
\lstinline!ndims(A)! &
\lstinline!ndims(A)! &
Returns the number of dimensions k of expression A, with k
\textgreater{}= 0.
\\ \hline
Expand All @@ -274,12 +274,12 @@ \subsection{Dimensionality Conversion Functions}\doublelabel{dimensionality-conv
\lstinline!scalar(A)! & Returns the single element of array A. size(A,i) = 1 is required for 1
\textless{}= i \textless{}= ndims(A).\\ \hline
\lstinline!vector(A)!
&
&
Returns a 1-vector, if A is a scalar and otherwise returns a vector
containing all the elements of the array, provided there is at most one
dimension size \textgreater{} 1.\\ \hline
\lstinline!matrix(A)!
&
&
Returns promote(A,2), if A is a scalar or vector and otherwise returns
the elements of the first two dimensions as a matrix. size(A,i) = 1 is
required for 2 \textless{} i \textless{}= ndims(A).\\ \hline
Expand Down Expand Up @@ -486,7 +486,7 @@ \subsubsection{Reduction Expressions}\doublelabel{reduction-expressions}
\endhead
\lstinline!sum! & Integer or Real & \lstinline!zeros(...)!\\ \hline
\lstinline!product! & Scalar Integer or Real & \lstinline!1!\\ \hline
\lstinline!min! & Scalar enumeration, Boolean, Integer or Real &
\lstinline!min! & Scalar enumeration, Boolean, Integer or Real &
\begin{tabular}{@{}p{6cm}@{}}
Greatest value of type\\( \lstinline!Modelica.Constants.inf! for Real)
\end{tabular}\\ \hline
Expand Down Expand Up @@ -621,12 +621,12 @@ \subsubsection{Array Constructor with One Iterator}\doublelabel{array-constructo
{[}\emph{Example}:
\begin{lstlisting}[language=modelica]
array(i for i in 1:10)
// Gives the vector 1:10={1,2,3,...,10}
{r for r in 1.0 : 1.5 : 5.5}
// Gives the vector 1.0:1.5:5.5={1.0, 2.5, 4.0, 5.5}
{i^2 for i in {1,3,7,6}}
// Gives the vector 1:10={1,2,3,...,10}

{r for r in 1.0 : 1.5 : 5.5}
// Gives the vector 1.0:1.5:5.5={1.0, 2.5, 4.0, 5.5}

{i^2 for i in {1,3,7,6}}
// Gives the vector {1, 9, 49, 36}
\end{lstlisting}
\subsubsection{Array Constructor with Several Iterators}\doublelabel{array-constructor-with-several-iterators}
Expand Down Expand Up @@ -706,7 +706,7 @@ \subsubsection{Array Concatenation along First and Second Dimensions}\doublelabe
dimensions which will be at least two.
\item
\emph{Concatenation along second dimension}:\\
\lstinline![A, B, C, ...] = cat(2, promote(A,n), promote(B,n), promote(C,n), ...)!
\lstinline![A, B, C, ...] = cat(2, promote(A,n), promote(B,n), promote(C,n), ...)!
where \lstinline!n = max(2, ndims(A), ndims(B), ndims(C), ....)!. If necessary, 1-sized
dimensions are added to the right of A, B, C before the operation is
carried out, especially that each operand has at least two dimensions.
Expand Down
62 changes: 31 additions & 31 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -112,22 +112,22 @@ \subsection{Syntax and Examples of Component Declarations}\doublelabel{syntax-an
\begin{lstlisting}[language=grammar]
component-clause:
type-prefix type-specifier [ array-subscripts ] component-list

type-prefix :
[ flow | stream ]
[ discrete | parameter | constant ] [ input | output ]

type-specifier :
name
component-list :
component-declaration { "," component-declaration }

component-declaration :
declaration [ condition-attribute ] comment

condition-attribute:
if expression

declaration :
IDENT [ array-subscripts ] [ modification ]
\end{lstlisting}
Expand Down Expand Up @@ -225,7 +225,7 @@ \subsubsection{Prefix Rules}\doublelabel{prefix-rules}
Variables declared with the \lstinline!flow! or the \lstinline!stream! type prefix shall be a
subtype of Real.

Type prefixes (that is , \lstinline!flow!, \lstinline!stream!, \lstinline!discrete!,
Type prefixes (that is , \lstinline!flow!, \lstinline!stream!, \lstinline!discrete!,
\lstinline!parameter!, \lstinline!constant!,
\lstinline!input!, \lstinline!output!) shall only be applied for type, record and connector
components -- see also record specialized class, \autoref{specialized-classes}.
Expand All @@ -251,7 +251,7 @@ \subsubsection{Prefix Rules}\doublelabel{prefix-rules}
\lstinline!stream!, \lstinline!input! and \lstinline!output! are applied for a structured component, no
element of the component may have any of these type prefixes.
{[}\emph{For example,} \lstinline!input! \emph{can only be used, if none of the
elements has a} \lstinline!flow!, \lstinline!stream!, \lstinline!input! \emph{or}
elements has a} \lstinline!flow!, \lstinline!stream!, \lstinline!input! \emph{or}
\lstinline!output! \emph{type
prefix}{]}. The corresponding rules for the type prefixes \lstinline!discrete!,
\lstinline!parameter! and \lstinline!constant! are described in \autoref{variability-of-structured-entities} for structured
Expand Down Expand Up @@ -402,10 +402,10 @@ \subsection{Component Variability Prefixes discrete, parameter, constant}\double
variable not assigned in any when-clause and without any type prefix is
a continuous-time variable.

The default variability for \lstinline!Integer!, \lstinline!String!,
The default variability for \lstinline!Integer!, \lstinline!String!,
\lstinline!Boolean!, or \lstinline!enumeration!
variables is discrete-time, and it is not possible to declare
continuous-time \lstinline!Integer!, \lstinline!String!, \lstinline!Boolean!, or
continuous-time \lstinline!Integer!, \lstinline!String!, \lstinline!Boolean!, or
\lstinline!enumeration! variables.
{[}\emph{A Modelica translator is able to guarantee this property due to
restrictions imposed on discrete expressions, see \autoref{variability-of-expressions}}{]}
Expand Down Expand Up @@ -495,7 +495,7 @@ \subsubsection{Variability of Structured Entities}\doublelabel{variability-of-st
parameter A a;
// a.pi is a constant
// a.y and a.i are parameters

A b;
// b.pi is a constant
// b.y is a continuous-time variable
Expand Down Expand Up @@ -579,33 +579,33 @@ \section{Class Declarations}\doublelabel{class-declarations}

\begin{lstlisting}[language=grammar]
class-definition :
[ encapsulated ] class-prefixes
[ encapsulated ] class-prefixes
class-specifier

class-prefixes :
[ partial ]
( class | model | [ operator ] record | block | [ expandable ] connector | type |
package | [ ( pure | impure ) ] [ operator ] function | operator )

class-specifier :
long-class-specifier | short-class-specifier | der-class-specifier

long-class-specifier :
IDENT string-comment composition end IDENT
| extends IDENT [ class-modification ] string-comment composition
end IDENT

short-class-specifier :
IDENT "=" base-prefix name [ array-subscripts ]
[ class-modification ] comment
| IDENT "=" enumeration "(" ( [enum-list] | ":" ) ")" comment

der-class-specifier :
IDENT "=" der "(" name "," IDENT { "," IDENT } ")" comment

base-prefix :
[ input | output ]

enum-list : enumeration-literal { "," enumeration-literal}

enumeration-literal : IDENT comment
Expand Down Expand Up @@ -676,7 +676,7 @@ \subsection{Short Class Definitions}\doublelabel{short-class-definitions}
\end{lstlisting}

Such an array class has exactly one anonymous component (\_); see also
\autoref{restriction-on-combining-base-classes-and-other-elements}.
\autoref{restriction-on-combining-base-classes-and-other-elements}.
When a component of such an array class type is
flattened, the resulting flattened component type is an array type with
the same dimensions as \_ and with the optional modifier applied.
Expand Down Expand Up @@ -749,7 +749,7 @@ \subsection{Restriction on combining base-classes and other elements}\doublelabe

model IllegalModel
extends Integrators;
Real x; // Illegal combination of component and array class
Real x; // Illegal combination of component and array class
end IllegalModel;

connector IllegalConnector
Expand Down Expand Up @@ -799,7 +799,7 @@ \section{Specialized Classes}\doublelabel{specialized-classes}
following table summarizes the definition of the specialized classes
(additional restrictions on inheritance are in \autoref{restrictions-on-the-kind-of-base-class}):

\begin{longtable}{|p{4cm}|p{9cm}|}
\begin{longtable}{|p{4cm}|p{9cm}|}
\hline \endhead
\lstinline!record! & Only public sections are allowed in the definition or
in any of its components (i.e., equation, algorithm, initial equation,
Expand Down Expand Up @@ -986,7 +986,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
The number of equations defined locally (i.e. not in any model or
block component), including binding equations, and equations generated
from connect-equations. \emph{This includes the proper count for
when-clauses (see \autoref{when-equations}), and algorithms (see \autoref{algorithm-sections}),
when-clauses (see \autoref{when-equations}), and algorithms (see \autoref{algorithm-sections}),
and is also used for the flat Hybrid DAE formulation
(see \autoref{modelica-dae-representation})}.
\item
Expand Down Expand Up @@ -1106,9 +1106,9 @@ \section{Balanced Models}\doublelabel{balanced-models}
Pin p, n;
Real u;
equation
0 = p.i + n.i;
0 = p.i + n.i;
u = p.v - n.v;
C*der(u) = p.i;
C*der(u) = p.i;
end Capacitor;
\end{lstlisting}
Expand All @@ -1118,7 +1118,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
\emph{Locally unknown variables}: \lstinline!p.i, p.v, n.i, n.v, u!
%TODO-FORMAT Should this be verbatim code instead?
\emph{Local equations}:
\emph{Local equations}:
\begin{eqnarray*}
0 &=& p.i + n.i;\\
u &=& p.v - n.v;\\
Expand Down Expand Up @@ -1164,9 +1164,9 @@ \section{Balanced Models}\doublelabel{balanced-models}
extends TwoPin;
Real u;
equation
0 = p.i + n.i;
0 = p.i + n.i;
u = p.v - n.v;
C*der(u) = p.i;
C*der(u) = p.i;
end Capacitor;
model Circuit
Expand All @@ -1192,7 +1192,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
\emph{and 2 flow variable for} \lstinline!c (c.p.i, c.n.i).!
\emph{Local equations}:
\emph{Local equations}:
\begin{eqnarray*} \text{p.v} &=& \text{t.p.v};\\
0 &=& \text{p.i}-\text{t.p.i};\\
\text{c.p.v} &=& \text{t.n.v};\\
Expand Down Expand Up @@ -1227,7 +1227,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
SI.Temperature T;
SI.Density d;
SI.SpecificInternalEnergy u;
connector InputAbsolutePressure = input SI.AbsolutePressure;
connector InputSpecificEnthalpy = input SI.SpecificEnthalpy;
connector InputMassFraction = input SI.MassFraction;
Expand Down Expand Up @@ -1276,7 +1276,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
3 \emph{(}\lstinline!T!\emph{,} \lstinline!d!\emph{,} \lstinline!u!\emph{: variables defined in}
\lstinline!BaseProperties! \emph{and inherited in} \lstinline!SimpleAir!\emph{), plus}
\item
2+\lstinline!nXi! \emph{(}\lstinline!p!\emph{,} \lstinline!h!\emph{,}
2+\lstinline!nXi! \emph{(}\lstinline!p!\emph{,} \lstinline!h!\emph{,}
\lstinline!Xi!\emph{: variables inside
connectors defined in} \lstinline!BaseProperties! \emph{and inherited in}
\lstinline!SimpleAir!\emph{)}
Expand Down Expand Up @@ -1366,7 +1366,7 @@ \section{Balanced Models}\doublelabel{balanced-models}
\lstinline!StateSelect.prefer! \emph{in the} \lstinline!SimpleAir! \emph{model (this means that
the default states} \lstinline!U,M! \emph{are derived quantities). If this state
selection is performed, all intrinsic medium variables are computed
from} \lstinline!medium.p! \emph{and} \lstinline!medium.T!\emph{, although}
from} \lstinline!medium.p! \emph{and} \lstinline!medium.T!\emph{, although}
\lstinline!p! \emph{and} \lstinline!h!
\emph{are the input arguments to the medium model. This demonstrates
that in Modelica input/output does not define the computational
Expand Down Expand Up @@ -1653,7 +1653,7 @@ \subsubsection{Type Conversion of Enumeration Values to String or Integer}\doubl
\lstinline!E=enumeration(e1, ..., en)!.
\lstinline!String(E.enumvalue)! gives the string representation of the enumeration
value.
value.
{[}\emph{Example:} \lstinline!String(E.Small)! \emph{gives
"}\lstinline!Small!\emph{".}{]}
Expand Down

0 comments on commit 6aab90d

Please sign in to comment.