Skip to content

Commit

Permalink
Clean up table of additional clock utility operators
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Sep 19, 2020
1 parent db1ff15 commit b86fcd3
Showing 1 changed file with 37 additions and 22 deletions.
59 changes: 37 additions & 22 deletions chapters/synchronous.tex
Expand Up @@ -1369,29 +1369,44 @@ \section{Initialization of Clocked Partitions}\label{initialization-of-clocked-p

\section{Other Operators}\label{other-operators}

The following additional utility operators are provided:
\begin{longtable}[]{|l|p{12cm}|}
\hline \endhead
\lstinline!firstTick(u)! &
This operator returns true at the first tick of the clock of the
expression, in which this operator is called. The operator returns false
at all subsequent ticks of the clock. The optional argument u is only
used for clock inference, see \cref{clock-partitioning}.\\ \hline
\lstinline!interval(u)! &
This operator returns the interval between the previous and present tick
of the clock of the expression, in which this operator is called. The
optional argument u is only used for clock inference, see \cref{clock-partitioning}.
At the first tick of the clock the following is returned: a) if the
specified clock interval is parametric, this value is returned; b)
otherwise the start value of the variable specifying the interval is
returned; c) for an event clock the additional startInterval argument to
the event clock constructor is returned. The return value of the
interval operator is a scalar Real number.
\\ \hline
\end{longtable}
A few additional utility operators are listed below.
\begin{center}
\begin{tabular}{l|l l}
\hline
\tablehead{Expression} & \tablehead{Description} & \tablehead{Details}\\
\hline
\hline
\lstinline!firstTick($u$)! & Test for first clock tick & \Cref{modelica:firstTick}\\
\lstinline!interval($u$)! & Interval between previous and present tick & \Cref{modelica:interval}\\
\hline
\end{tabular}
\end{center}

It is an error if these operators are called in the continuous-time
partition.
It is an error if these operators are called in the continuous-time partition.

\begin{operatordefinition}[firstTick]
\begin{synopsis}\begin{lstlisting}
firstTick($u$)
\end{lstlisting}\end{synopsis}
\begin{semantics}
This operator returns true at the first tick of the clock of the expression, in which this operator is called. The operator returns false at all subsequent ticks of the clock. The optional argument $u$ is only used for clock inference, see \cref{clock-partitioning}.
\end{semantics}
\end{operatordefinition}

\begin{operatordefinition}[interval]
\begin{synopsis}\begin{lstlisting}
interval($u$)
\end{lstlisting}\end{synopsis}
\begin{semantics}
This operator returns the interval between the previous and present tick of the clock of the expression, in which this operator is called. The optional argument $u$ is only used for clock inference, see \cref{clock-partitioning}. At the first tick of the clock the following is returned:
\begin{enumerate}
\item If the specified clock interval is parametric, this value is returned.
\item Otherwise the start value of the variable specifying the interval is returned.
\item For an event clock the additional \lstinline!startInterval! argument to the event clock constructor is returned.
\end{enumerate}
The return value of \lstinline!interval! is a scalar \lstinline!Real! number.
\end{semantics}
\end{operatordefinition}

\begin{example}
A discrete PI controller is parameterized with the parameters of a continuous PI controller, in order that the discrete block is robust against changes in the sample
Expand Down

0 comments on commit b86fcd3

Please sign in to comment.