Skip to content

Commit

Permalink
Add built-in types
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Dec 2, 2020
1 parent b1265f8 commit c61b1d6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 20 deletions.
16 changes: 6 additions & 10 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ \subsection{Other Predefined Types}\label{other-predefined-types}

\subsubsection{StateSelect}\label{stateselect}

The predefined \lstinline!StateSelect! enumeration type is the type of the \lstinline!stateSelect! attribute of the \lstinline!Real! type. It is used to explicitly control state selection.
The predefined \lstinline!StateSelect!\index{StateSelect@\indexinline{StateSelect}} enumeration type is the type of the \lstinline!stateSelect! attribute of the \lstinline!Real! type. It is used to explicitly control state selection.

\begin{lstlisting}[language=modelica]
type StateSelect = enumeration(
Expand All @@ -1585,27 +1585,23 @@ \subsubsection{StateSelect}\label{stateselect}

\subsubsection{ExternalObject}\label{externalobject}

See \cref{external-objects} for information about the predefined type
\lstinline!ExternalObject!.
See \cref{external-objects} for information about the predefined type \lstinline!ExternalObject!.

\subsubsection{AssertionLevel}\label{assertionlevel}

The predefined \lstinline!AssertionLevel! enumeration type is used together with
\lstinline!assert!, \cref{assert}.
The predefined \lstinline!AssertionLevel!\index{AssertionLevel@\indexinline{AssertionLevel}} enumeration type is used together with \lstinline!assert!, \cref{assert}.
\begin{lstlisting}[language=modelica]
type AssertionLevel=enumeration(warning, error);
\end{lstlisting}

\subsubsection{Connections}\label{connections}

The package \lstinline!Connections! is used for over-constrained connection graphs, \cref{equation-operators-for-overconstrained-connection-based-equation-systems}.
The package \lstinline!Connections!\index{Connections@\indexinline{Connections}} is used for over-constrained connection graphs, \cref{equation-operators-for-overconstrained-connection-based-equation-systems}.

\subsubsection{Graphical Annotation Types}\label{graphical-annotation-types}

A number of ``predefined'' record types and enumeration types for
graphical annotations are described in \cref{annotations}. These types are not
predefined in the usual sense since they cannot be referenced in
ordinary Modelica code, only within annotations.
A number of ``predefined'' record types and enumeration types for graphical annotations are described in \cref{annotations}.
These types are not predefined in the usual sense since they cannot be referenced in ordinary Modelica code, only within annotations.

\subsubsection{Clock Types}\label{clock-types}

Expand Down
10 changes: 5 additions & 5 deletions chapters/connectors.tex
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
\end{semantics}
\end{operatordefinition*}

\begin{operatordefinition}[Connections.branch]
\begin{operatordefinition}[Connections.branch]\index{Connections.branch@\indexinline{Connections.branch}}
\begin{synopsis}\begin{lstlisting}
Connections.branch(A.R, B.R)
\end{lstlisting}\end{synopsis}
Expand All @@ -880,7 +880,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
\end{semantics}
\end{operatordefinition}

\begin{operatordefinition}[Connections.root]
\begin{operatordefinition}[Connections.root]\index{Connections.root@\indexinline{Connections.root}}
\begin{synopsis}\begin{lstlisting}
Connections.root(A.R)
\end{lstlisting}\end{synopsis}
Expand All @@ -893,7 +893,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
\end{semantics}
\end{operatordefinition}

\begin{operatordefinition}[Connections.potentialRoot]
\begin{operatordefinition}[Connections.potentialRoot]\index{Connections.potentialRoot@\indexinline{Connections.potentialRoot}}
\begin{synopsis}\begin{lstlisting}
Connections.potentialRoot(A.R)
Connections.potentialRoot(A.R, priority=$p$)
Expand All @@ -909,7 +909,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
\end{semantics}
\end{operatordefinition}

\begin{operatordefinition}[Connections.isRoot]
\begin{operatordefinition}[Connections.isRoot]\index{Connections.isRoot@\indexinline{Connections.isRoot}}
\begin{synopsis}\begin{lstlisting}
Connections.isRoot(A.R)
\end{lstlisting}\end{synopsis}
Expand All @@ -918,7 +918,7 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over
\end{semantics}
\end{operatordefinition}

\begin{operatordefinition}[Connections.rooted]
\begin{operatordefinition}[Connections.rooted]\index{Connections.rooted@\indexinline{Connections.rooted}}
\begin{synopsis}\begin{lstlisting}
Connections.rooted(A.R)
rooted(A.R) // deprecated!
Expand Down
5 changes: 2 additions & 3 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2476,11 +2476,10 @@ \subsubsection{Utility Functions for Allocating Strings}\label{utility-functions
\subsection{External Objects}\label{external-objects}

External functions may need to store their internal memory between function calls.
Within Modelica this memory is defined as instance of the
predefined class \lstinline!ExternalObject! according to the following rules:
Within Modelica this memory is defined as instance of the predefined class \lstinline!ExternalObject! according to the following rules:
\begin{itemize}
\item
There is a predefined partial class \lstinline!ExternalObject!.
There is a predefined partial class \lstinline!ExternalObject!\index{ExternalObject@\indexinline{ExternalObject}}.
\begin{nonnormative}
Since the class is partial, it is not possible to define an instance of this class.
\end{nonnormative}
Expand Down
5 changes: 3 additions & 2 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,9 @@ \subsection{Clocks and Clocked Variables}\label{clocks-and-clocked-variables}
\end{figure}

\begin{definition}[Clock variable]\index{clock variable}
Clock variables $c(t_{i})$ are of base type \lstinline!Clock!. A clock is either defined by a constructor (such as \lstinline!Clock(3)!) that defines when the clock ticks (is active) at
a particular time instant, or it is defined with clock operators relatively to other clocks, see \cref{base-clock-conversion-operators}. See \cref{fig:clock-variable}.
Clock variables $c(t_{i})$ are of base type \lstinline!Clock!\index{Clock@\indexinline{Clock}}.
A clock is either defined by a constructor (such as \lstinline!Clock(3)!) that defines when the clock ticks (is active) at a particular time instant, or it is defined with clock operators relatively to other clocks, see \cref{base-clock-conversion-operators}.
See \cref{fig:clock-variable}.
\end{definition}

\begin{example}
Expand Down

0 comments on commit c61b1d6

Please sign in to comment.