From 474f7da775a5ccfd003dd9c739e5e9f4fe6999e1 Mon Sep 17 00:00:00 2001 From: Henrik Tidefelt Date: Mon, 21 Sep 2020 00:31:36 +0200 Subject: [PATCH] Basic cleanup of table for overconstrained connections --- chapters/connectors.tex | 157 ++++++++++++++++++++++------------------ 1 file changed, 87 insertions(+), 70 deletions(-) diff --git a/chapters/connectors.tex b/chapters/connectors.tex index 284f07a94..e3b0acc9e 100644 --- a/chapters/connectors.tex +++ b/chapters/connectors.tex @@ -854,78 +854,95 @@ \subsection{Overconstrained Equation Operators for Connection Graphs}\label{over Additionally, corresponding nodes of the virtual connection graph have to be defined as roots or as potential roots with functions \lstinline!Connections.root! and \lstinline!Connections.potentialRoot!, respectively. -In the following table, \lstinline!A! and \lstinline!B! are connector instances that may be -hierarchically structured, e.g., \lstinline!A! may be an abbreviation for -\lstinline!EnginePort.Frame!. - -\begin{longtable}[]{|p{5.1cm}|p{10cm}|} -\hline \endhead -\lstinline!connect(A,B);! & -Defines \firstuse{optional spanning-tree edge} from the -overdetermined type or record instances in connector instance \lstinline!A! to the -corresponding overdetermined type or record instances in connector -instance \lstinline!B! for a virtual connection graph. The types of the -corresponding overdetermined type or record instances shall be the -same.\\ \hline -\lstinline!Connections.branch(A.R,B.R);! & -Defines a \firstuse{required spanning-tree edge} -from the overdetermined type or record instance \lstinline!R! in connector instance -\lstinline!A! to the corresponding overdetermined type or record instance \lstinline!R! in -connector instance \lstinline!B! for a virtual connection graph. This function can -be used at all places where a \lstinline!connect! statement is allowed. -\par -\begin{nonnormative*} -E.g., it is not allowed to use this function in a when-clause. This definition shall be used if in a model with connectors \lstinline!A! and \lstinline!B! the overdetermined -records \lstinline!A.R! and \lstinline!B.R! are algebraically coupled in the model, e.g., due to \lstinline!B.R = f(A.R!, \textless{}other unknowns\textgreater{}). -\end{nonnormative*} -\\ \hline -\lstinline!Connections.root(A.R);! & The overdetermined type or record instance \lstinline!R! in -connector instance \lstinline!A! is a (definite) \firstuse{root node} in a virtual connection graph. -\par -\begin{nonnormative*} -This definition shall be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! is (consistently) assigned, e.g., from a parameter expressions. -\end{nonnormative*} -\\ \hline -\begin{tabular}{@{}p{5.1cm}@{}} -\lstinline!Connections.potentialRoot(A.R);!\\ -\lstinline!Connections.potentialRoot(!\\ -\lstinline!A.R, priority = p)!; -\end{tabular} -& The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is -a \firstuse{potential root node} in a virtual connection graph with priority -\lstinline!p! ($p\ge 0$). If no second argument is provided, the priority is zero. -\lstinline!p! shall be a parameter expression of type \lstinline!Integer!. In a -virtual connection subgraph without a \lstinline!Connections.root! definition, one -of the potential roots with the lowest priority number is selected as -root. -\par -\begin{nonnormative*} -This definition may be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! appears differentiated -- \lstinline!der(A.R)! -- together -with the \emph{constraint equations} of \lstinline!A.R!, i.e., a non-redundant subset of \lstinline!A.R! maybe used as states. -\end{nonnormative*} -%\strut -%\end{minipage} -\\ \hline -\lstinline!b = Connections.isRoot(A.R);! & Returns true, if the overdetermined type -or record instance \lstinline!R! in connector instance A is selected as a root in -the virtual connection graph.\\ \hline -\begin{tabular}{@{}p{5.1cm}@{}} -\lstinline!b = Connections.rooted(A.R);!\\ -\lstinline!b = rooted(A.R); // deprecated! + +The overconstrained equation operators for connection graphs are listed below. Here, \lstinline!A! and \lstinline!B! are connector instances that may be hierarchically structured, e.g., \lstinline!A! may be an abbreviation for \lstinline!EnginePort.Frame!. +\begin{center} +\begin{tabular}{l|l l} +\hline +\tablehead{Expression} & \tablehead{Description} & \tablehead{Details}\\ +\hline +\hline +\lstinline!connect(A, B)! & Optional spanning-tree edge & \Cref{modelica:optional-spanning-tree-edge}\\ +\lstinline!Connections.branch(A.R, B.R)! & Required spanning-tree edge & \Cref{modelica:Connections.branch}\\ +\lstinline!Connections.root(A.R)! & Definite root node & \Cref{modelica:Connections.root}\\ +\lstinline!Connections.potentialRoot(A.R, $\ldots$)! & Potential root node & \Cref{modelica:Connections.potentialRoot}\\ +\lstinline!Connections.isRoot(A.R)! & Predicate for being selected as root & \Cref{modelica:Connections.isRoot}\\ +\lstinline!Connections.rooted(A.R)! & Predicate for being closer to root & \Cref{modelica:Connections.rooted}\\ +\hline \end{tabular} -& If the operator \lstinline!Connections.rooted(A.R)! -is used, or the equivalent but deprecated operator \lstinline!rooted(A.R)!, then -there must be exactly one statement \lstinline!Connections.branch(A.R,B.R)! -involving \lstinline!A.R! (the argument of \lstinline!Connections.rooted! must be the first -argument of \lstinline!Connections.branch!). In that case \lstinline!Connections.rooted(A.R)! -returns true, if \lstinline!A.R! is closer to the root of the spanning tree than -\lstinline!B.R!; otherwise false is returned. -\par -\begin{nonnormative*} +\end{center} + +\begin{operatordefinition*}[connect]\label{modelica:optional-spanning-tree-edge} +\begin{synopsis}\begin{lstlisting} +connect(A, B) +\end{lstlisting}\end{synopsis} +\begin{semantics} +Defines \firstuse{optional spanning-tree edge} from the overdetermined type or record instances in connector instance \lstinline!A! to the corresponding overdetermined type or record instances in connector instance \lstinline!B! for a virtual connection graph. The types of the corresponding overdetermined type or record instances shall be the same. +\end{semantics} +\end{operatordefinition*} + +\begin{operatordefinition}[Connections.branch] +\begin{synopsis}\begin{lstlisting} +Connections.branch(A.R, B.R) +\end{lstlisting}\end{synopsis} +\begin{semantics} +Defines a \firstuse{required spanning-tree edge} from the overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! to the corresponding overdetermined type or record instance \lstinline!R! in connector instance \lstinline!B! for a virtual connection graph. This function can be used at all places where a \lstinline!connect! statement is allowed. + +\begin{nonnormative} +E.g., it is not allowed to use this function in a when-clause. This definition shall be used if in a model with connectors \lstinline!A! and \lstinline!B! the overdetermined records \lstinline!A.R! and \lstinline!B.R! are algebraically coupled in the model, e.g., due to \lstinline!B.R = f(A.R!, \textless{}other unknowns\textgreater{}). +\end{nonnormative} +\end{semantics} +\end{operatordefinition} + +\begin{operatordefinition}[Connections.root] +\begin{synopsis}\begin{lstlisting} +Connections.root(A.R) +\end{lstlisting}\end{synopsis} +\begin{semantics} +The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a (definite) \firstuse{root node} in a virtual connection graph. + +\begin{nonnormative} +This definition shall be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! is (consistently) assigned, e.g., from a parameter expressions. +\end{nonnormative} +\end{semantics} +\end{operatordefinition} + +\begin{operatordefinition}[Connections.potentialRoot] +\begin{synopsis}\begin{lstlisting} +Connections.potentialRoot(A.R) +Connections.potentialRoot(A.R, priority=$p$) +\end{lstlisting}\end{synopsis} +\begin{semantics} +The overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is a \firstuse{potential root node} in a virtual connection graph with priority \lstinline!p! ($p \geq 0$). If no second argument is provided, the priority is zero. \lstinline!p! shall be a parameter expression of type \lstinline!Integer!. In a virtual connection subgraph without a \lstinline!Connections.root! definition, one of the potential roots with the lowest priority number is selected as root. + +\begin{nonnormative} +This definition may be used if in a model with connector \lstinline!A! the overdetermined record \lstinline!A.R! appears differentiated -- \lstinline!der(A.R)! -- together with the \emph{constraint equations} of \lstinline!A.R!, i.e., a non-redundant subset of \lstinline!A.R! maybe used as states. +\end{nonnormative} +\end{semantics} +\end{operatordefinition} + +\begin{operatordefinition}[Connections.isRoot] +\begin{synopsis}\begin{lstlisting} +Connections.isRoot(A.R) +\end{lstlisting}\end{synopsis} +\begin{semantics} +Returns true, if the overdetermined type or record instance \lstinline!R! in connector instance \lstinline!A! is selected as a root in the virtual connection graph. +\end{semantics} +\end{operatordefinition} + +\begin{operatordefinition}[Connections.rooted] +\begin{synopsis}\begin{lstlisting} +Connections.rooted(A.R) +rooted(A.R) // deprecated! +\end{lstlisting}\end{synopsis} +\begin{semantics} +If the operator \lstinline!Connections.rooted(A.R)! is used, or the equivalent but deprecated operator \lstinline!rooted(A.R)!, then there must be exactly one statement \lstinline!Connections.branch(A.R, B.R)! involving \lstinline!A.R! (the argument of \lstinline!Connections.rooted! must be the first argument of \lstinline!Connections.branch!). In that case \lstinline!Connections.rooted(A.R)! returns true, if \lstinline!A.R! is closer to the root of the spanning tree than \lstinline!B.R!; otherwise false is returned. + +\begin{nonnormative} This operator can be used to avoid equation systems by providing analytic inverses, see \lstinline!Modelica.Mechanics.MultiBody.Parts.FixedRotation!. -\end{nonnormative*} -\\ \hline -\end{longtable} +\end{nonnormative} +\end{semantics} +\end{operatordefinition} \begin{nonnormative} Note, that \lstinline!Connections.branch!, \lstinline!Connections.root!,