diff --git a/chapters/equations.tex b/chapters/equations.tex index 9b311d63e..931c15aa3 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -603,14 +603,7 @@ \section{Events and Synchronization}\label{events-and-synchronization} exact event instant. \end{nonnormative} -Relations are taken literally also during continuous integration, if the -relation or the expression in which the relation is present, are the -argument of \lstinline!noEvent!. \lstinline!smooth! also -allows relations used as argument to be taken literally. The \lstinline!noEvent! -feature is propagated to all subrelations in the scope of the \lstinline!noEvent! -application. For \lstinline!smooth! the liberty to not allow literal evaluation is -propagated to all subrelations, but the smooth-property itself is not -propagated. +Relations are taken literally also during continuous integration, if the relation or the expression in which the relation is present, are the argument of \lstinline!noEvent!. \lstinline!smooth! also allows relations used as argument to be taken literally. The \lstinline!noEvent! feature is propagated to all subrelations in the scope of the \lstinline!noEvent! application. For \lstinline!smooth! the liberty to not allow literal evaluation is propagated to all subrelations, but the smoothness property itself is not propagated. \begin{example} \begin{lstlisting}[language=modelica] @@ -619,14 +612,9 @@ \section{Events and Synchronization}\label{events-and-synchronization} z = smooth(0, if u > uMax then uMax elseif u < uMin then uMin else u); \end{lstlisting} -In this case \lstinline!x = y = z!, but a tool might generate events for \lstinline!z!. The -if-expression is taken literally without inducing state events. +In this case \lstinline!x = y = z!, but a tool might generate events for \lstinline!z!. The if-expression is taken literally without inducing state events. -The \lstinline!smooth! function is useful, if e.g.\ the modeler can guarantee that -the used if-clauses fulfill at least the continuity requirement of -integrators. In this case the simulation speed is improved, since no -state event iterations occur during integration. The \lstinline!noEvent! function is -used to guard against \emph{outside domain} errors, e.g.\ \lstinline!y = if noEvent(x>= 0) then sqrt(x) else 0.! +The \lstinline!smooth! operator is useful, if e.g.\ the modeler can guarantee that the used if-clauses fulfill at least the continuity requirement of integrators. In this case the simulation speed is improved, since no state event iterations occur during integration. The \lstinline!noEvent! operator is used to guard against \emph{outside domain} errors, e.g.\ \lstinline!y = if noEvent(x >= 0) then sqrt(x) else 0.! \end{example} All equations and assignment statements within when-clauses and all assignment statements within \lstinline!function! classes are implicitly treated with \lstinline!noEvent!, i.e., relations within the scope of these operators never induce state or time events. diff --git a/chapters/lexicalstructure.tex b/chapters/lexicalstructure.tex index a7205d5cf..9b1932c4a 100644 --- a/chapters/lexicalstructure.tex +++ b/chapters/lexicalstructure.tex @@ -235,14 +235,15 @@ \subsection{Strings}\label{strings} literal. For example, the following statement defines one string that contains (non-printable) newline characters: \begin{lstlisting}[language=modelica] -assert(noEvent(length > s_small), " +assert(noEvent(length > s_small), + " The distance between the origin of frame_a and the origin of frame_b of a LineForceWithMass component became smaller as parameter s_small (= a small number, defined in the \"Advanced\" menu). The distance is set to s_small, although it is smaller, to avoid a division by zero when computing the direction of the line force.", -level = AssertionLevel.warning); + level = AssertionLevel.warning); \end{lstlisting} \end{nonnormative} diff --git a/chapters/operatorsandexpressions.tex b/chapters/operatorsandexpressions.tex index 304622356..5ef238196 100644 --- a/chapters/operatorsandexpressions.tex +++ b/chapters/operatorsandexpressions.tex @@ -516,7 +516,7 @@ \subsection{Event Triggering Mathematical Functions}\label{event-triggering-math These expression for \lstinline!div!, \lstinline!ceil!, \lstinline!floor!, and \lstinline!integer! are event generating expression. The event generating expression for \lstinline!mod(x,y)! is \lstinline!floor(x/y)!, and for \lstinline!rem(x,y)! it is \lstinline!div(x,y)! -- i.e.\ events are not generated when \lstinline!mod! or \lstinline!rem! changes continuously in an interval, but when they change discontinuously from one interval to the next. \begin{nonnormative} -If this is not desired, the \lstinline!noEvent! function can be applied to them. E.g.\ \lstinline!noEvent(integer(v))!. +If this is not desired, the \lstinline!noEvent! operator can be applied to them. E.g.\ \lstinline!noEvent(integer(v))!. \end{nonnormative} \begin{operatordefinition}[div]