Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1037,11 +1037,14 @@ \section{Balanced Models}\label{balanced-models}
\end{itemize}
\end{definition}

\begin{definition}[Local equation size]\index{local equation size}
\begin{definition}[Local equation size]\index{local equation size}\label{local-equation-size}
The local equation size of a \lstinline!model! or \lstinline!block! class is the sum of the following numbers:
\begin{itemize}
\item
The number of equations defined locally (i.e., not in any \lstinline!model! or \lstinline!block! component), including binding equations, and equations generated from \lstinline!connect!-equations.
Similarly as for variables the count is after expanding to scalars of primitive types.
For calls of functions with multiple outputs, \cref{output-formal-parameters-of-functions} the number of equations is the total number of scalar primitive elements of the component references in the left hand side.
For \lstinline!assert! and other empty functions calls \cref{empty-function-calls} the size is zero.
\begin{nonnormative}
This includes the proper count for \lstinline!when!-clauses (see \cref{when-equations}), and algorithms (see \cref{algorithm-sections}), and is also used for the flat Hybrid DAE formulation (see \cref{modelica-dae-representation}).
\end{nonnormative}
Expand Down
2 changes: 1 addition & 1 deletion chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ \subsection{If-Equations}\label{if-equations}
In an equation section, the equations in the body are seen as equations that must be satisfied.
The bodies that are not selected have no effect on that model evaluation.

The \lstinline!if!-equations in equation sections which do not have exclusively parameter expressions as switching conditions shall have the same number of equations in each branch (a missing else is counted as zero equations and the number of equations is defined after expanding the equations to scalar equations).
The \lstinline!if!-equations in equation sections which do not have exclusively parameter expressions as switching conditions shall have the same number of equations in each branch (a missing else is counted as zero equations and the number of equations is defined as in \cref{local-equation-size}).

\begin{nonnormative}
If this condition is violated, the single assignment rule would not hold, because the number of equations may change during simulation although the number of unknowns remains the same.
Expand Down