From ca5afe9caec6b5128ab9ed812697b3ba20da9154 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Wed, 3 Jun 2020 00:59:47 +0200 Subject: [PATCH] Remove empty parentheses that don't mean empty parentheses This change is related to the other changes where operators with function calling syntax are mentioned. --- chapters/classes.tex | 2 +- chapters/equations.tex | 2 +- chapters/operatorsandexpressions.tex | 8 ++++---- chapters/statemachines.tex | 2 +- chapters/stream.tex | 9 ++++----- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/chapters/classes.tex b/chapters/classes.tex index 194e624ec..4499ff789 100644 --- a/chapters/classes.tex +++ b/chapters/classes.tex @@ -378,7 +378,7 @@ \subsection{Component Variability Prefixes discrete, parameter, constant}\double A \emph{discrete-time} variable \lstinline!vd! has a vanishing time derivative between events. Note that this is not the same as saying that \lstinline!der(vd)=0! almost everywhere, as the derivative is not even defined at the events, and it is not legal - to apply \lstinline!der()! to discrete-time variables as they are not continuous. During transient analysis the variable + to apply \lstinline!der! to discrete-time variables as they are not continuous. During transient analysis the variable can only change its value at event instants (see \autoref{events-and-synchronization}). \item diff --git a/chapters/equations.tex b/chapters/equations.tex index c55b397d2..6f6d6bb7f 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -311,7 +311,7 @@ \subsubsection{Restrictions on Equations within When-Equations}\doublelabel{rest \item \lstinline!v = expr;! \item \lstinline!(out1, out2, out3, ...) = function_call_name(in1, in2, ...);! \item - operators \lstinline!assert()!, \lstinline!terminate()!, \lstinline!reinit()! + operators \lstinline!assert!, \lstinline!terminate!, \lstinline!reinit! \item For- and if-equations if the equations within the for- and if-equations satisfy these requirements. diff --git a/chapters/operatorsandexpressions.tex b/chapters/operatorsandexpressions.tex index b7a32a369..85fd8f706 100644 --- a/chapters/operatorsandexpressions.tex +++ b/chapters/operatorsandexpressions.tex @@ -481,7 +481,7 @@ \subsubsection{Event Triggering Mathematical Functions}\doublelabel{event-trigge \lstinline!div(x,y)! & Returns the algebraic quotient \lstinline!x/y! with any fractional part discarded (also known as truncation toward zero). \begin{nonnormative} -This is defined for \lstinline!/! in C99; in C89 the result for negative numbers is implementation-defined, so the standard function \lstinline!div()! must be used. +This is defined for \lstinline!/! in C99; in C89 the result for negative numbers is implementation-defined, so the standard function \lstinline[language=C]!div! must be used. \end{nonnormative} Result and arguments shall have type \lstinline!Real! or \lstinline!Integer!. If either of the arguments is \lstinline!Real! the result is \lstinline!Real! otherwise @@ -810,7 +810,7 @@ \subsubsection{spatialDistribution}\doublelabel{spatialdistribution} \end{lstlisting} Events are generated at the exact instants when the velocity -changes sign -- if this is not needed, \lstinline!noEvent()! can be used to +changes sign --- if this is not needed, \lstinline!noEvent! can be used to suppress event generation. If the velocity is known to be always positive, then \lstinline!out0! can be omitted, e.g.: @@ -1009,7 +1009,7 @@ \subsubsection{homotopy}\doublelabel{homotopy} \subsubsection{semiLinear}\doublelabel{semilinear} (See definition of \lstinline!semiLinear! in \autoref{derivative-and-special-purpose-operators-with-function-syntax}). In some situations, -equations with the \lstinline!semiLinear()! function become underdetermined if the +equations with \lstinline!semiLinear! become underdetermined if the first argument (\lstinline!x!) becomes zero, i.e., there are an infinite number of solutions. It is recommended that the following rules are used to transform the equations during the translation phase in order to select @@ -1363,7 +1363,7 @@ \subsection{Discrete-Time Expressions}\doublelabel{discrete-time-expressions} argument is non-discrete time expression and subtype of \lstinline!Real!. \begin{nonnormative} These will generate events, see \autoref{events-and-synchronization}. Note that \lstinline!rem! and \lstinline!mod! generate events but are not discrete-time - expressions. In other words, relations inside \lstinline!noEvent()!, such as \lstinline!noEvent(x>1)!, are not discrete-time expressions. + expressions. In other words, relations inside \lstinline!noEvent!, such as \lstinline!noEvent(x>1)!, are not discrete-time expressions. \end{nonnormative} \item The functions \lstinline!pre!, \lstinline!edge!, and \lstinline!change! result in discrete-time diff --git a/chapters/statemachines.tex b/chapters/statemachines.tex index 4d7a74a5d..4f18b98e5 100644 --- a/chapters/statemachines.tex +++ b/chapters/statemachines.tex @@ -157,7 +157,7 @@ \section{State Machine Graphics}\doublelabel{state-machine-graphics} lines. \end{nonnormative} -The annotation for graphics of \lstinline!transition()! has the following +The annotation for graphics of \lstinline!transition! has the following structure: \lstinline[mathescape=true]!annotation(Line($\ldots$), Text($\ldots$))!; and for \lstinline!initialState()!: \emph{graphical-primitives}\lstinline[mathescape=true]!(Line($\ldots$))!; with \lstinline!Line! and \lstinline!Text! annotations defined in \autoref{annotations}. diff --git a/chapters/stream.tex b/chapters/stream.tex index 6067b7b2f..6dd11d3c2 100644 --- a/chapters/stream.tex +++ b/chapters/stream.tex @@ -405,11 +405,10 @@ \section{Stream Operator actualStream}\doublelabel{stream-operator-actualstream} \end{lstlisting} \begin{nonnormative} -The \textbf{actualStream}(v) operator is typically used in two -contexts: +\lstinline!actualStream! is typically used in two contexts: \begin{lstlisting}[language=modelica] - der(U) = c.m_flow*actualStream(c.h_outflow); // (1) energy balance equation - h_c = actualStream(c.h); // (2) monitoring the enthalpy at port c + der(U) = c.m_flow * actualStream(c.h_outflow); // (1) energy balance equation + h_c = actualStream(c.h); // (2) monitoring the enthalpy at port c \end{lstlisting} In the case of equation (1), although \lstinline!actualStream! is discontinuous, the product with the flow variable is not, because @@ -424,7 +423,7 @@ \section{Stream Operator actualStream}\doublelabel{stream-operator-actualstream} flowing through a port is. In this case, the user will probably want to see the change due to flow reversal at the exact instant, so an event should be generated. If the user doesn't bother, then he/she should -enclose the right-hand side of (2) with \lstinline!noEvent()!. Since the output of +enclose the right-hand side of (2) with \lstinline!noEvent!. Since the output of \lstinline!actualStream! will be discontinuous, it should not be used by itself to model physical behaviour (e.g., to compute densities used in momentum balances) --- \lstinline!inStream! should be used for this purpose.