Skip to content

Commit

Permalink
Avoid \textbf for starting examples
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 2, 2020
1 parent 9e3eb85 commit 862d926
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 13 deletions.
7 changes: 5 additions & 2 deletions chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
\lstinline!inner! scope qualifier, all outer instances must also be taken into
account during elaboration.
\end{enumerate}
\textbf{Example.} Engine system with sensors, controllers, actuator and plant that
\end{nonnormative}

\begin{example}
Engine system with sensors, controllers, actuator and plant that
exchange information via a bus (i.e. via expandable connectors):
\begin{lstlisting}[language=modelica]
import Modelica.Units.SI;
Expand Down Expand Up @@ -368,7 +371,7 @@ \subsection{Expandable Connectors}\doublelabel{expandable-connectors}
CylinderBus cylinder_bus[3];
CylinderBus cylinder_bus[4];
\end{lstlisting}
\end{nonnormative}
\end{example}

\section{Generation of Connection Equations}\doublelabel{generation-of-connection-equations}

Expand Down
6 changes: 4 additions & 2 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,10 @@ \subsection{The Number of Equations Needed for Initialization}\doublelabel{the-n
derivative variables. At initialization of an ODE we will need to find
the values of 2n+m variables, in contrast to just n+m variables to be
solved for during simulation.
\end{nonnormative}

\textbf{Example.} Consider the following simple equation system:
\begin{example}
Consider the following simple equation system:
\begin{lstlisting}[language=modelica]
der(x1) = f1(x1);
der(x2) = f2(x2);
Expand All @@ -968,7 +970,7 @@ \subsection{The Number of Equations Needed for Initialization}\doublelabel{the-n
variables n. As noted in \autoref{initialization-initial-equation-and-initial-algorithm} a tool may add/remove
initial equations to fulfill this requirement, if appropriate
diagnostics are given.
\end{nonnormative}
\end{example}

\subsection{Recommended selection of start-values}\doublelabel{recommended-selection-of-start-values}

Expand Down
14 changes: 9 additions & 5 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,9 @@ \subsubsection{homotopy}\doublelabel{homotopy}
annotation(Inline = true);
end homotopy;
\end{lstlisting}
\end{nonnormative}

\textbf{Example 1.} In electrical systems it is often difficult to solve non-linear
\begin{example}[1] In electrical systems it is often difficult to solve non-linear
algebraic equations if switches are part of the algebraic loop. An
idealized diode model might be implemented in the following way, by
starting with a ``flat'' diode characteristic and then move with
Expand All @@ -944,8 +945,9 @@ \subsubsection{homotopy}\doublelabel{homotopy}
...
end IdealDiode;
\end{lstlisting}
\end{example}

\textbf{Example 2.} In electrical systems it is often useful that all voltage sources
\begin{example}[2] In electrical systems it is often useful that all voltage sources
start with zero voltage and all current sources with zero current, since
steady state initialization with zero sources can be easily obtained. A
typical voltage source would then be defined as:
Expand All @@ -957,8 +959,9 @@ \subsubsection{homotopy}\doublelabel{homotopy}
v = homotopy(actual=V, simplified=0.0);
end ConstantVoltageSource;
\end{lstlisting}
\end{example}

\textbf{Example 3.} In fluid system modelling, the pressure/flowrate relationships are
\begin{example}[3] In fluid system modelling, the pressure/flowrate relationships are
highly nonlinear due to the quadratic terms and due to the dependency on
fluid properties. A simplified linear model, tuned on the nominal
operating point, can be used to make the overall model less nonlinear
Expand All @@ -979,8 +982,9 @@ \subsubsection{homotopy}\doublelabel{homotopy}
...
end PressureLoss;
\end{lstlisting}
\end{example}

\textbf{Example 4.} Note that \lstinline!homotopy! \textbf{shall not} be used to
\begin{example}[4] Note that \lstinline!homotopy! \textbf{shall not} be used to
combine unrelated expressions, since this can generate singular systems
from combining two well-defined systems.
\begin{lstlisting}[language=modelica]
Expand All @@ -999,7 +1003,7 @@ \subsubsection{homotopy}\doublelabel{homotopy}
and you can solve the two equations to give
$$ x=\frac{\lambda+(\lambda-1)x_0}{2\lambda-1}$$
which has the correct value of $x_0$ at $\lambda = 0$ and of 1 at $\lambda= 1$, but unfortunately has a singularity at $\lambda = 0.5 $.
\end{nonnormative}
\end{example}


\subsubsection{semiLinear}\doublelabel{semilinear}
Expand Down
8 changes: 4 additions & 4 deletions preamble.tex
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@
}

% Example environment, as a special case of non-normative content.
\newenvironment{example*}[0]{%
\begin{nonnormative*}Example:
\newenvironment{example*}[1][\unskip]{%
\begin{nonnormative*}Example #1:
}{%
\end{nonnormative*}
}
\newenvironment{example}[0]{%
\begin{nonnormative}Example:
\newenvironment{example}[1][\unskip]{%
\begin{nonnormative}Example #1:
}{%
\end{nonnormative}
}
Expand Down

0 comments on commit 862d926

Please sign in to comment.