Skip to content

Commit

Permalink
Cleanup of more lower camel case identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 14, 2020
1 parent 8087e0d commit a7f55f4
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 92 deletions.
71 changes: 25 additions & 46 deletions chapters/annotations.tex
Expand Up @@ -729,23 +729,11 @@ \subsubsection{Ellipse}\label{ellipse}
\end{lstlisting}
The \lstinline!extent! attribute specifies the bounding box of the ellipse.

Partial ellipses can be drawn using the \lstinline!startAngle! and \lstinline!endAngle!
attributes. These specify the endpoints of the arc prior to the stretch
and rotate operations. The arc is drawn counter-clockwise from
\lstinline!startAngle! to \lstinline!endAngle!, where startAngle and endAngle are defined
counter-clockwise from 3 o'clock (the positive x-axis).

The closure attribute specifies whether the endpoints specified by
\lstinline!startAngle! and \lstinline!endAngle! are to be joined by lines to the centre of the
extent (\lstinline!closure=EllipseClosure.Radial!), joined by a single straight line
between the end points (\lstinline!closure=EllipseClosure.Chord!), or left
unconnected (\lstinline!closure=EllipseClosure.None!). In the latter case, the
ellipse is treated as an open curve instead of a closed shape, and the
\lstinline!fillPattern! and \lstinline!fillColor! are not applied (if present, they are
ignored).

The default closure is \lstinline!EllipseClosure.Chord! when \lstinline!startAngle! is 0 and
\lstinline!endAngle! is 360, or \lstinline!EllipseClosure.Radial! otherwise.
Partial ellipses can be drawn using the \lstinline!startAngle! and \lstinline!endAngle! attributes. These specify the endpoints of the arc prior to the stretch and rotate operations. The arc is drawn counter-clockwise from \lstinline!startAngle! to \lstinline!endAngle!, where \lstinline!startAngle! and \lstinline!endAngle! are defined counter-clockwise from 3 o'clock (the positive x-axis).

The closure attribute specifies whether the endpoints specified by \lstinline!startAngle! and \lstinline!endAngle! are to be joined by lines to the center of the extent (\lstinline!closure = EllipseClosure.Radial!), joined by a single straight line between the end points (\lstinline!closure = EllipseClosure.Chord!), or left unconnected (\lstinline!closure = EllipseClosure.None!). In the latter case, the ellipse is treated as an open curve instead of a closed shape, and the \lstinline!fillPattern! and \lstinline!fillColor! are not applied (if present, they are ignored).

The default closure is \lstinline!EllipseClosure.Chord! when \lstinline!startAngle! is 0 and \lstinline!endAngle! is 360, or \lstinline!EllipseClosure.Radial! otherwise.

\begin{nonnormative}
The default for a closed ellipse is not \lstinline!EllipseClosure.None!, since that would result in \lstinline!fillColor!
Expand Down Expand Up @@ -870,16 +858,18 @@ \subsection{Variable Graphics and Schematic Animation}\label{variable-graphics-a
references to variables to enable a dynamic behavior.

\begin{example}
The level of a tank could be animated by a
rectangle expanding in vertical direction and its color depending on a
variable overflow:
\begin{lstlisting}[language=modelica]
annotation (
Icon(graphics={Rectangle(
extent=DynamicSelect({{0,0},{20,20}},{{0,0},{20,level}}),
fillColor=DynamicSelect({0,0,255},
if overflow then {255,0,0} else {0,0,255}))})
);
The level of a tank could be animated by a rectangle expanding in vertical direction and its color depending on a variable overflow:
\begin{lstlisting}[language=modelica]
annotation (Icon(graphics =
{Rectangle(
extent =
DynamicSelect({{0, 0}, {20, 20}},
{{0, 0}, {20, level}}),
fillColor =
DynamicSelect({0, 0, 255},
if overflow then {255, 0, 0} else {0, 0, 255})
)}
));
\end{lstlisting}
\end{example}

Expand Down Expand Up @@ -1477,9 +1467,7 @@ \subsubsection{Conversion rules}\label{conversion-rules}

Convert class \lstinline!OldClass! to \lstinline!NewClass!.

Match longer path first, so if converting both \lstinline!A! to \lstinline!C! and \lstinline!A.B! to \lstinline!D! then
\lstinline!A.F! is converted to \lstinline!C.F! and \lstinline!A.B.E! to \lstinline!D.E!. This is considered before
convertMessage for the same \lstinline!OldClass!.
Match longer path first, so if converting both \lstinline!A! to \lstinline!C! and \lstinline!A.B! to \lstinline!D! then \lstinline!A.F! is converted to \lstinline!C.F! and \lstinline!A.B.E! to \lstinline!D.E!. This is considered before \lstinline!convertMessage! for the same \lstinline!OldClass!.

\begin{example}
Consider the following as part of a conversion script:
Expand All @@ -1497,8 +1485,7 @@ \subsubsection{Conversion rules}\label{conversion-rules}
\lstinline!oldElement! has the value \lstinline!whenValue!, and also remove the modifier for
\lstinline!oldElement!.

These are considered before \lstinline!convertClass! and \lstinline!convertMessage! for the same
\lstinline!OldClass!.
These are considered before \lstinline!convertClass! and \lstinline!convertMessage! for the same \lstinline!OldClass!.

The old element should be of a \lstinline!Boolean!, \lstinline!Integer!, \lstinline!String!, or enumeration
type and the match is based on the literal value of the modifier.
Expand Down Expand Up @@ -1569,22 +1556,16 @@ \subsubsection{Conversion rules}\label{conversion-rules}
Behaviour in unusual cases:
\begin{itemize}
\item
if NewModifier list is empty then the modifier is just removed
if \lstinline!NewModifier! list is empty then the modifier is just removed
\item
If OldModifer list is empty it is added for all uses of the class
If \lstinline!OldModifer! list is empty it is added for all uses of the class
\item
If OldModifier\_i is cardinality(a)=0 the conversion will only be
applied for a component comp if there are no inside connections to
comp.a. This can be combined with other modifiers that are handled in
the usual way.
If \lstinline!OldModifier$i$! is \lstinline!cardinality(a) = 0! the conversion will only be applied for a component comp if there are no inside connections to \lstinline!comp.a!. This can be combined with other modifiers that are handled in the usual way.
\item
If OldModifier\_i is cardinality(a)=1 the conversion will only be
applied for a component comp if there are any inside connections to
comp.a.
If \lstinline!OldModifier$i$! is \lstinline!cardinality(a) = 1! the conversion will only be applied for a component comp if there are any inside connections to \lstinline!comp.a!.
\end{itemize}

The converted modifiers and existing modifiers are merged such that the existing modifiers take precedence over the result of convertModifiers.
A diagnostics is recommended if this merging removes some modifiers unless those modifiers are identical or it is the special case of an empty OldModifier list.
The converted modifiers and existing modifiers are merged such that the existing modifiers take precedence over the result of \lstinline!convertModifiers!. A diagnostics is recommended if this merging removes some modifiers unless those modifiers are identical or it is the special case of an empty OldModifier list.
\begin{nonnormative}
This can be used to handle the case where the default value was changed.
\end{nonnormative}
Expand Down Expand Up @@ -1677,9 +1658,7 @@ \subsubsection{Conversion rules}\label{conversion-rules}
could not be applied with the given message.

\begin{nonnormative}
This is useful if there is no possibility to convert a specific parameter (or other element),
especially if it rarely modified. If the parameter had no impact on the model it can be removed
using convertModifiers, see \cref{convertmodifiers}.
This is useful if there is no possibility to convert a specific parameter (or other element), especially if it rarely modified. If the parameter had no impact on the model it can be removed using \lstinline!convertModifiers!, see \cref{convertmodifiers}.
\end{nonnormative}

\subsection{Mapping of Versions to File System}\label{mapping-of-versions-to-file-system}
Expand Down
2 changes: 1 addition & 1 deletion chapters/equations.tex
Expand Up @@ -381,7 +381,7 @@ \subsection{reinit}\label{reinit}
reinit(x, expr);
\end{lstlisting}

The operator reinitializes \lstinline!x! with \lstinline!expr! at an event instant. \lstinline!x! is a \lstinline!Real! variable (or an array of \lstinline!Real! variables) that must be selected as a state (resp., states) , i.e.\ \lstinline!reinit! on \lstinline!x! implies \lstinline!stateSelect=StateSelect.always! on \lstinline!x!. \lstinline!expr! needs to be type-compatible with \lstinline!x!. \lstinline!reinit! can for the same variable (resp.\ array of variables) only be applied (either as an individual variable or as part of an array of variables) in one equation (having \lstinline!reinit! of the same variable in when and else-when of the same variable is allowed). In case of \lstinline!reinit! active during initialization (due to when initial), see \cref{initialization-initial-equation-and-initial-algorithm}.
The operator reinitializes \lstinline!x! with \lstinline!expr! at an event instant. \lstinline!x! is a \lstinline!Real! variable (or an array of \lstinline!Real! variables) that must be selected as a state (resp., states), i.e.\ \lstinline!reinit! on \lstinline!x! implies \lstinline!stateSelect = StateSelect.always! on \lstinline!x!. \lstinline!expr! needs to be type-compatible with \lstinline!x!. \lstinline!reinit! can for the same variable (resp.\ array of variables) only be applied (either as an individual variable or as part of an array of variables) in one equation (having \lstinline!reinit! of the same variable in when and else-when of the same variable is allowed). In case of \lstinline!reinit! active during initialization (due to when initial), see \cref{initialization-initial-equation-and-initial-algorithm}.

\lstinline!reinit! does not break the single assignment rule, because \lstinline!reinit(x, expr)! in equations evaluates \lstinline!expr! to a value,
then at the end of the current event iteration step it assigns this value to \lstinline!x! (this copying from values to reinitialized state(s) is
Expand Down
9 changes: 4 additions & 5 deletions chapters/functions.tex
Expand Up @@ -1369,7 +1369,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline!zeroDerivative=inputVar1 {, zeroDerivative=inputVar2 }!
\lstinline[language=grammar]!zeroDerivative = inputVar1 { , zeroDerivative = inputVar2 }!
\end{itemize}

The derivative function is only valid if \lstinline!inputVar1! (and \lstinline!inputVar2! etc.)
Expand Down Expand Up @@ -1442,7 +1442,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline!noDerivative=inputVar1!
\lstinline!noDerivative = inputVar1!
\end{itemize}

The derivative of inputVar1 is excluded from the argument list of the
Expand All @@ -1452,8 +1452,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
undifferentiated function will only behave correctly under these
assumptions.

The inputs excluded using zeroDerivative or noDerivative may be of any
type (including types not containing reals).
The inputs excluded using \lstinline!zeroDerivative! or \lstinline!noDerivative! may be of any type (including types not containing reals).

\begin{nonnormative}
Assume that function \lstinline!fg! is defined as a composition \lstinline!f(x, g(x))!.
Expand All @@ -1473,7 +1472,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati
output Real z;
algorithm
...
annotation(derivative(noDerivative=y) = f_der);
annotation(derivative(noDerivative = y) = f_der);
end f;

function f_der
Expand Down
4 changes: 2 additions & 2 deletions chapters/operatorsandexpressions.tex
Expand Up @@ -818,7 +818,7 @@ \subsubsection{spatialDistribution}\label{spatialdistribution}
initialPoints = {0.0, 1.0},
initialValues = {0.0, 0.0});
\end{lstlisting}
where \lstinline!in0!, \lstinline!in1!, \lstinline!out0!, \lstinline!out1!, \lstinline!x!, \lstinline!v! are all subtypes of \lstinline!Real!, \lstinline!positiveVelocity! is a \lstinline!Boolean!, \lstinline!initialPoints! and \lstinline!initialValues! are arrays of subtypes of \lstinline!Real! of equal size, containing the y coordinates and the $z$ values of a finite set of points describing the initial distribution of $z(y, \mathit{t0})$. The \lstinline!out0! and \lstinline!out1! are given by the solutions at $z(0.0, t)$ and $z(1.0, t)$; and \lstinline!in0! and \lstinline!in1! are the boundary conditions at $z(0.0, t)$ and $z(1.0, t)$ (at each point in time only one of in0 and in1 is used). Elements in the initialPoints array must be sorted in non-descending order. The operator can not be vectorized according to the vectorization rules described in \cref{scalar-functions-applied-to-array-arguments}. The operator can be vectorized only with respect to the arguments in0 and in1 (which must have the same size), returning vectorized outputs out0 and out1 of the same size; the arguments initialPoints and initialValues are vectorized accordingly.
where \lstinline!in0!, \lstinline!in1!, \lstinline!out0!, \lstinline!out1!, \lstinline!x!, \lstinline!v! are all subtypes of \lstinline!Real!, \lstinline!positiveVelocity! is a \lstinline!Boolean!, \lstinline!initialPoints! and \lstinline!initialValues! are arrays of subtypes of \lstinline!Real! of equal size, containing the y coordinates and the $z$ values of a finite set of points describing the initial distribution of $z(y, \mathit{t0})$. The \lstinline!out0! and \lstinline!out1! are given by the solutions at $z(0.0, t)$ and $z(1.0, t)$; and \lstinline!in0! and \lstinline!in1! are the boundary conditions at $z(0.0, t)$ and $z(1.0, t)$ (at each point in time only one of in0 and in1 is used). Elements in the \lstinline!initialPoints! array must be sorted in non-descending order. The operator can not be vectorized according to the vectorization rules described in \cref{scalar-functions-applied-to-array-arguments}. The operator can be vectorized only with respect to the arguments in0 and in1 (which must have the same size), returning vectorized outputs out0 and out1 of the same size; the arguments \lstinline!initialPoints! and \lstinline!initialValues! are vectorized accordingly.

The solution, $z$, can be described in terms of characteristics:
\begin{equation*}
Expand Down Expand Up @@ -890,7 +890,7 @@ \subsubsection{spatialDistribution}\label{spatialdistribution}
If the velocity is known to be always positive, then \lstinline!out0! can be omitted, e.g.:
\begin{lstlisting}[language=modelica]
der(x) = v;
(,out1) = spatialDistribution(in0, 0, x, true, initialPoints, initialValues);
(, out1) = spatialDistribution(in0, 0, x, true, initialPoints, initialValues);
\end{lstlisting}
Technically relevant use cases for the use of \lstinline!spatialDistribution! are modeling of electrical transmission lines, pipelines and pipeline networks for gas, water and district heating, sprinkler systems, impulse propagation in elongated bodies, conveyor belts, and hydraulic systems. Vectorization is needed for pipelines where more than one quantity is transported with velocity \lstinline!v! in the example above.
\end{nonnormative}
Expand Down
2 changes: 1 addition & 1 deletion chapters/overloaded.tex
Expand Up @@ -87,7 +87,7 @@ \section{Matching Function}\label{matching-function}
$A_{i}$ = typeOf($A_{i}$) for 1 $\le$ i $\le$ k,
\item
the names $b_{j}$ = $u_{Qj}$, Qj \textgreater{}
k, $A_{Qj}$ =typeOf($w_{i}$) for 1 $\le$ j $\le$ p, and
k, $A_{Qj}$ = typeOf($w_{i}$) for 1 $\le$ j $\le$ p, and
\item
if the union of \{i: 1 $\le$ i $\le$ k \}, \{Qj: 1 $\le$ j $\le$ p\}, and \{m:
$P_{m}$ \lstinline!true! and 1 $\le$ m $\le$ n \} is the set \{i: 1 $\le$
Expand Down
17 changes: 6 additions & 11 deletions chapters/revisions.tex
Expand Up @@ -533,7 +533,7 @@ \subsection{Main changes in Modelica 3.3 Revision 1}\label{main-changes-in-model
\href{https://github.com/modelica/ModelicaSpecification/issues/1252}{\#1252},
\href{https://github.com/modelica/ModelicaSpecification/issues/1281}{\#1281}.
\item
Clarified default for annotation choicesAllMatching, \cref{annotation-choices-for-suggested-redeclarations-and-modifications}.
Clarified default for annotation \lstinline!choicesAllMatching!, \cref{annotation-choices-for-suggested-redeclarations-and-modifications}.
Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1391}{\#1391}.
\item
Forbid when-statements in initial equation/algorithm (they would in
Expand Down Expand Up @@ -639,7 +639,7 @@ \subsection{Main changes in Modelica 3.3 Revision 1}\label{main-changes-in-model
Corrected syntax in Line definition, \cref{line}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/1464}{\#1464}.
\item
Corrected connectorSizing description, \cref{annotations-for-the-graphical-user-interface}. Ticket
Corrected \lstinline!connectorSizing! description, \cref{annotations-for-the-graphical-user-interface}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/1441}{\#1441}.
\item
Corrected license example, \cref{licensing}. Ticket
Expand Down Expand Up @@ -889,9 +889,8 @@ \subsection{Main changes in Modelica 3.2 Revision 2}\label{main-changes-in-model
Updated \lstinline!noDerivative! to be consistent with MSL, \cref{using-the-derivative-annotation}. This is an incompatibility, but the other variant was not used.
Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/1035}{\#1035}.
\item
Clarified handling of component with missingInnerMessage;
\cref{annotations-for-the-graphical-user-interface}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/891}{\#891}.
Clarified handling of component with \lstinline!missingInnerMessage!; \cref{annotations-for-the-graphical-user-interface}.
Ticket \href{https://github.com/modelica/ModelicaSpecification/issues/891}{\#891}.
\item
Clarified definition of protected; \cref{access-control-public-and-protected-elements}. Ticket
\href{https://github.com/modelica/ModelicaSpecification/issues/975}{\#975},
Expand Down Expand Up @@ -1388,8 +1387,7 @@ \subsection{Main changes in Modelica 3.1}\label{main-changes-in-modelica-3-1}
support connector of the Modelica.Mechanics.Rotational/Translational
libraries.
\item
A tool that uses missingInnerMessage to give information may also
automatically use the corresponding \lstinline!inner!-component.
A tool that uses \lstinline!missingInnerMessage! to give information may also automatically use the corresponding \lstinline!inner!-component.
\item
URIs can be used for links in html-documentation and for the Bitmap
annotation (such as: \filename{modelica://Modelica.Mechanics/C.jpg} for image
Expand Down Expand Up @@ -2184,10 +2182,7 @@ \subsection{Main Changes in Modelica 2.0}\label{main-changes-in-modelica-2-0}
previously not formally be defined, such as while-clauses, if-clauses.
\end{itemize}

The language changes are backward compatible, except for the
introduction of the new keyword enumeration and the removal of the
operator analysisType(). The library change of the block library which
will become available soon requires changes in user-models.
The language changes are backward compatible, except for the introduction of the new keyword enumeration and the removal of the operator \lstinline!analysisType!. The library change of the block library which will become available soon requires changes in user-models.

\section{Modelica 1.4}\label{modelica-1-4}

Expand Down

0 comments on commit a7f55f4

Please sign in to comment.