From 671e4b22c6a3e0af2940b1dadc4b82d1af89d1d0 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Mon, 9 Nov 2020 23:53:10 +0100 Subject: [PATCH] Let's have a look at sentence-based line breaks In response to review comment: - https://github.com/modelica/ModelicaSpecification/pull/2627#discussion_r519734647 --- chapters/equations.tex | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/chapters/equations.tex b/chapters/equations.tex index 2f5df296d..586cc1c88 100644 --- a/chapters/equations.tex +++ b/chapters/equations.tex @@ -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}