Skip to content

Commit 5d81bc0

Browse files
committed
Describe event-generation similar to 'delay'
1 parent 5a29f34 commit 5d81bc0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

chapters/operatorsandexpressions.tex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,9 @@ \subsubsection{spatialDistribution}\label{spatialdistribution}
796796
\end{equation*}
797797
This allows the direct computation of the solution based on interpolating the boundary conditions.
798798

799-
Except when used inside \lstinline!noEvent!, discontinuities in \lstinline!in0! and \lstinline!in1! are preserved in the distribution $z$, and trigger events when appearing in any of the operator outputs.
799+
When a \lstinline!spatialDistribution!-expression is discrete-time (see \cref{discrete-time-expressions}), events will be generated in order to allow the value to change at the correct points in time.
800+
Further, when a \lstinline!spatialDistribution!-expression is non-discrete-time and event generation is enabled (not appearing inside \lstinline!noEvent!), discontinuities in \lstinline!in0! and \lstinline!in1! may preserved in the distribution $z$, and trigger events when appearing in any of the operator outputs.
801+
It is a quality of implementation to avoid excessive generation of events by only preserving significant discontinuities.
800802

801803
Disregarding the event-triggering handling of discontinuities, \lstinline!spatialDistribution! can be described in terms of the pseudo-code given as a block:
802804
\begin{lstlisting}[language=modelica]
@@ -1684,6 +1686,8 @@ \subsection{Discrete-Time Expressions}\label{discrete-time-expressions}
16841686
\end{nonnormative}
16851687
\item
16861688
Unless inside \lstinline!noEvent!: \lstinline!delay($x$, $\ldots$)!, if $x$ is a discrete-time expression.
1689+
\item
1690+
Unless inside \lstinline!noEvent!: \lstinline!spatialDistribution($\mathit{in0}$, $\mathit{in1}$, $\ldots$)!, if $\mathit{in0}$ and $\mathit{in1}$ are discrete-time expressions.
16871691
\item
16881692
Unless inside \lstinline!noEvent!: Function calls where the function has annotation \lstinline!GenerateEvents = true! (\cref{modelica:GenerateEvents}), the output does not contain a subtype of \lstinline!Real!, and any non-\lstinline!Real! inputs have discrete-time variability.
16891693
For a function call returning multiple return values (see \cref{output-formal-parameters-of-functions}) the variability is decided separately for each output.

0 commit comments

Comments
 (0)