Skip to content

Commit

Permalink
Use lstinline more etc
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed May 16, 2019
1 parent 0a4af3f commit 2d0e01c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions chapters/annotations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ \section{Annotations for Simulation Experiments}\doublelabel{annotations-for-sim
{[}s{]}, the default stop time (StopTime) in {[}s{]}, the suitable time
resolution for the result grid (Interval) in {[}s{]}, and the default
relative integration tolerance (Tolerance) for simulation experiments to
be carried out with the model or block at hand. If StartTime is not specified it is assumed to be 0.0.
be carried out with the model or block at hand. If StartTime is not specified it is assumed to be \lstinline!0.0!.

\section{Annotation for single use of class}\doublelabel{annotation-for-single-use-of-class}

Expand Down Expand Up @@ -668,7 +668,7 @@ \subsection{Connections}\doublelabel{connections1}
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.
Having a zero size for the extent is deprecated and is handled as if upper part is moved up an approprimate amount.
Having a zero size for the extent is deprecated and is handled as if upper part is moved up an appropriate amount.

{[}\emph{Example:}
\begin{lstlisting}[language=modelica]
Expand All @@ -679,7 +679,7 @@ \subsection{Connections}\doublelabel{connections1}
\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.
Using \lstinline!extent=[-6,3; -6,3]! is deprecated, but gives similar result.}
Using a height of zero, such as \lstinline!extent=[-6,3; -6,3]! is deprecated, but gives similar result.}
{]}

\subsection{Graphical primitives}\doublelabel{graphical-primitives}
Expand Down
8 changes: 4 additions & 4 deletions chapters/arrays.tex
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,11 @@ \subsection{Reduction Functions and Operators}\doublelabel{reduction-functions-a
\begin{tabular}{@{}p{10cm}@{}}
Also described in \autoref{reduction-expressions}\\
Returns the sum of the expression e(i, ..., j) evaluated for all
combinations of i in u, ..., j in v: For integer indexing this is
combinations of i in u, ..., j in v: For \lstinline!Integer! indexing this is
e(u{[}1{]},...
,v{[}1{]})+e(u{[}2{]},... ,v{[}1{]})+... +e(u{[}end{]},...
,v{[}1{]})+...+e(u{[}end{]},... ,v{[}end{]})
For non-integer indexing this uses all valid indices instead of 1..end.
For non-\lstinline!Integer! this uses all valid indices instead of 1..end.
The type of sum(e(i, ..., j) for i in u, ..., j
in v) is the same as the type of e(i,...j).
\end{tabular}\\ \hline
Expand All @@ -436,12 +436,12 @@ \subsection{Reduction Functions and Operators}\doublelabel{reduction-functions-a
\begin{tabular}{@{}p{10cm}@{}}
Also described in \autoref{reduction-expressions}.\\
Returns the product of the scalar expression e(i, ..., j) evaluated for
all combinations of i in u, ..., j in v: For integer indexing this is
all combinations of i in u, ..., j in v: For \lstinline!Integer! indexing this is
\begin{lstlisting}[language=modelica]
e(u[1],...,v[1])*e(u[2],...,v[1])*...
*(u[end],...,v[1])*...*e(u[end],...,v[end])
\end{lstlisting}
For non-integer indexing this uses all valid indices instead of 1..end.
For non-\lstinline!Integer! this uses all valid indices instead of 1..end.
The type of product(e(i, ..., j) for i in u, ..., j
in v) is the same as the type of e(i,...j).
\end{tabular}
Expand Down
2 changes: 1 addition & 1 deletion chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ \subsection{Converting the Connection Graph into Trees and Generating Connection
\begin{enumerate}
\item
For optional spanning-tree edge {[}\emph{i.e., a} \lstinline!connect(A,B)!
For every optional spanning-tree edge {[}\emph{i.e., a} \lstinline!connect(A,B)!
\emph{equation,}{]} in one of the spanning trees, the connection
equations are generated according to \autoref{generation-of-connection-equations}.
\item
Expand Down
2 changes: 1 addition & 1 deletion chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1157,7 +1157,7 @@ \subsection{Event-Related Operators with Function Syntax}\doublelabel{event-rela

% reinit
\lstinline!reinit(x, expr)! & In the body of a when clause, reinitializes \lstinline!x! with
\lstinline!expr! at an event instant. \lstinline!x! is a scalar or array Real variable that is implicitly defined to have \lstinline!StateSelect.always!
\lstinline!expr! at an event instant. \lstinline!x! is a scalar or array \lstinline!Real! variable that is implicitly defined to have \lstinline!StateSelect.always!
{[}\emph{so must be selected as a state, and it is an error, if
this is not possible}{]}. \lstinline!expr! needs to be type-compatible with \lstinline!x!. The
reinit operator can only be applied once for the same variable - either
Expand Down
14 changes: 7 additions & 7 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ \section{Clock Constructors}\doublelabel{clock-constructors}

The input argument, \lstinline!interval!, is a clocked Component Expression (see
\autoref{argument-restrictions-component-expression}) or a parameter expression.
Interval must be strictly positive (\lstinline!interval>0.0!) of type \textbf{Real} unit ``s''.
The \lstinline!interval! must be strictly positive (\lstinline!interval>0.0!) of type \textbf{Real} unit ``s''.
The output argument is of base type Clock that
ticks when time becomes t\textsubscript{start},
t\textsubscript{start}+interval1,
Expand Down Expand Up @@ -973,7 +973,7 @@ \subsection{Base-clock Partitioning}\doublelabel{base-clock-partitioning}
properties:

A variable u in \lstinline!sample(u)!, a variable y in y =
\lstinline!hold(ud)!, and a variable b in \lstinline!Clock(b, startInterval)! where b is of boolean type is in a continuous-time partition.
\lstinline!hold(ud)!, and a variable b in \lstinline!Clock(b, startInterval)! where b is of \lstinline!Boolean! type is in a continuous-time partition.

Correspondingly, variables u and y in y = \textbf{sample}(uc), y =
\textbf{subSample}(u), y = \textbf{superSample}(u), y =
Expand Down Expand Up @@ -1039,7 +1039,7 @@ \subsection{Sub-clock Partitioning}\doublelabel{sub-clock-partitioning}
\textbf{previous}(x),}\\
&\multicolumn{3}{p{14cm}}{which lexically appear in e}\\
&&\multicolumn{2}{p{13cm}}{except as first argument of sub-clock conversion operators:}\\
&&&\multicolumn{1}{p{12cm}}{subSample, superSample, shiftSample, backSample, noClock, and Clock with first argument of boolean type.}
&&&\multicolumn{1}{p{12cm}}{subSample, superSample, shiftSample, backSample, noClock, and Clock with first argument of \lstinline!Boolean! type.}
\end{tabular}
The resulting set of connected components, is the partitioning of the
equations and variables, S\textsubscript{ij} =
Expand Down Expand Up @@ -1379,15 +1379,15 @@ \subsection{Inferencing of solverMethod}\doublelabel{inferencing-of-solvermethod
inferred with a similar mechanism as for sub-clock inferencing, see
\autoref{sub-clock-inferencing}.

For each sub-clock partition we build a set corresponding from this sub-clock partition.
For each sub-clock partition we build a set corresponding to this sub-clock partition.
These sets are then merged as follows: for each set without a specified solverMethod we merge it
with sets connected to it (these may contain a solverMethod); and this is repeated until it is not possible to merge more sets.

\begin{itemize}
\item If this set contains multiple different solverMethods it is an error.
\item If this set contains multiple different values for \lstinline!solverMethod! it is an error.
\item If the set contains continuous time-equations:
\begin{itemize}
\item If this set contains no solverMethod it is an error.
\item If this set contains no \lstinline!solverMethod! it is an error.
\item Otherwise we use the specified solverMethod.
\end{itemize}
\item If the set does not contain continuous time-equations there is no need for a solverMethod.
Expand Down Expand Up @@ -1416,7 +1416,7 @@ \subsection{Inferencing of solverMethod}\doublelabel{inferencing-of-solvermethod
der(z)=subSample(x,4)+1+subSample(y);
end IllegalInference;
\end{lstlisting}
Here z is a continuous-time equation connected directly to both x and y partitions that have different solverMethod.
Here \lstinline!z! is a continuous-time equation connected directly to both \lstinline!x! and \lstinline!y! partitions that have different \lstinline!solverMethod!.
{]}

\section{Initialization of Clocked Partitions}\doublelabel{initialization-of-clocked-partitions}
Expand Down

0 comments on commit 2d0e01c

Please sign in to comment.