You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The protected components and connections needed to internally handle the support-connector is omitted.
490
490
\end{example}
491
491
492
+
A connector component declaration may have the following annotation:
493
+
\begin{lstlisting}[language=modelica]
494
+
annotation(mayOnlyConnectOnce = "message");
495
+
\end{lstlisting}%
496
+
\annotationindex{mayOnlyConnectOnce}
497
+
498
+
It makes it an error if the connector is connected from the outside and:
499
+
\begin{itemize}
500
+
\item For non-stream connectors the connection set has more than two elements.
501
+
\item For stream connectors (see \cref{stream-connectors}), the connection set has more than two elements whose flow variable may be negative (based on evaluation of the \lstinline!min!-attribute).
502
+
\end{itemize}
503
+
For an array of connectors it applies separately to each element.
504
+
505
+
\begin{nonnormative}
506
+
This annotation is intended for non-causal connectors, see \cref{restrictions-of-connections-and-connectors}.
507
+
The connection handling operates on connection sets, and thus this restriction should also operate on those sets.
508
+
The set handling avoids the case where only one of two equivalent models generate diagnostics.
509
+
The stream connector part is primarily intended to exclude sensor-variables, see \cref{connection-of-3-stream-connectors-where-one-mass-flow-rate-is-identical-to-zero-n-3-and}, but also excludes non-reversible outgoing flows.
510
+
\end{nonnormative}
511
+
512
+
\begin{example}
513
+
This can be used for components that implement mixing of fluids where it is not desired to combine that with the normal stream-connector mixing.
514
+
\begin{lstlisting}[language=modelica]
515
+
partial model MultiPort
516
+
parameter Integer n = 0 annotation(Dialog(connectorSizing = true));
517
+
FluidPort_a port_a(redeclare package Medium = Medium);
518
+
FluidPorts_b ports_b[n](redeclare each package Medium = Medium)
519
+
annotation (mayOnlyConnectOnce = "Should only connect once per element!");
0 commit comments