Skip to content

Commit

Permalink
Let's have a look at sentence-based line breaks
Browse files Browse the repository at this point in the history
In response to review comment:
- #2627 (comment)
  • Loading branch information
henrikt-ma committed Nov 9, 2020
1 parent 81d319f commit 671e4b2
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -421,30 +421,27 @@ \subsection{assert}\label{assert}
This means that \lstinline!assert! can be called as if it were a function with three formal parameters, the third formal parameter has the name \lstinline!level! and the default value \lstinline!AssertionLevel.error!.
\end{nonnormative}

If the \lstinline!condition! of an assertion is true, \lstinline!message! is not evaluated and
the procedure call is ignored. If the \lstinline!condition! evaluates to false
different actions are taken depending on the level input:
If the \lstinline!condition! of an assertion is true, \lstinline!message! is not evaluated and the procedure call is ignored.
If the \lstinline!condition! evaluates to false different actions are taken depending on the level input:
\begin{itemize}
\item
\lstinline!level = AssertionLevel.error!: The current evaluation is aborted. The
simulation may continue with another evaluation. If the simulation is aborted, \lstinline!message! indicates the
cause of the error.
\lstinline!level = AssertionLevel.error!:
The current evaluation is aborted.
The simulation may continue with another evaluation.
If the simulation is aborted, \lstinline!message! indicates the cause of the error.
\begin{nonnormative}
Ways to continue simulation with another evaluation include using a shorter step-size, or changing the values of iterationvariables.
\end{nonnormative}
Failed assertions take precedence over successful termination, such
that if the model first triggers the end of successful analysis by
reaching the stop-time or explicitly with \lstinline!terminate!, but the
evaluation with \lstinline!terminal()=true! triggers an assert, the analysis
failed.
Failed assertions take precedence over successful termination, such that if the model first triggers the end of successful analysis by reaching the stop-time or explicitly with \lstinline!terminate!, but the evaluation with \lstinline!terminal()=true! triggers an assert, the analysis failed.
\item
\lstinline!level = AssertionLevel.warning!: The current evaluation is not aborted.
\lstinline!level = AssertionLevel.warning!:
The current evaluation is not aborted.
\lstinline!message! indicates the cause of the warning.
\begin{nonnormative}
It is recommended to report the warning only once when the condition becomes false, and it is reported that the condition is no longer
violated when the condition returns to true. The \lstinline!assert! statement shall have no influence on the behavior of the model.
For example, by evaluating the condition and reporting the message only after accepted integrator steps. \lstinline!condition! needs to
be implicitly treated with \lstinline!noEvent! since otherwise events might be triggered that can lead to slightly changed simulation results.
It is recommended to report the warning only once when the condition becomes false, and it is reported that the condition is no longer violated when the condition returns to true.
The \lstinline!assert! statement shall have no influence on the behavior of the model.
For example, by evaluating the condition and reporting the message only after accepted integrator steps.
\lstinline!condition! needs to be implicitly treated with \lstinline!noEvent! since otherwise events might be triggered that can lead to slightly changed simulation results.
\end{nonnormative}
\end{itemize}

Expand Down

0 comments on commit 671e4b2

Please sign in to comment.