Skip to content

Commit

Permalink
Clarify "unexpanded" expression of declaration equation
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Mar 31, 2021
1 parent 65913cf commit b1b0dd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chapters/classes.tex
Expand Up @@ -282,8 +282,9 @@ \subsubsection{Prefix Rules}\label{prefix-rules}

\subsection{Acyclic Bindings of Constants and Parameters}\label{acyclic-bindings-of-constants-and-parameters}

For a constant or parameter \lstinline!v! with declaration equation, the unexpanded expression of the declaration equation in the flattended model must not depend on \lstinline!v! itself, neither directly nor indirectly via other variables' declaration equations.
For a constant or parameter \lstinline!v! with declaration equation, the expression of the declaration equation in the flattended model must not depend on \lstinline!v! itself, neither directly nor indirectly via other variables' declaration equations.
To satisfy this condition, dependencies shall be removed as needed by applying simplifications based on values of constants (except with \lstinline!Evaluate = false!) and all other \willbedefined{structural parameters} (\cref{component-variability-prefixes-discrete-parameter-constant}) that don't depend on \lstinline!v!.
It is not permitted to expand a non-scalar declaration equation into scalar equations to satisfy the condition.

That the value of a structural parameter is used for these simplifications does not mean that it has to be determined during translation, but if \lstinline!v! is found to be a structural parameter, then a Modelica tool will be able to break all cycles involving \lstinline!v! by making some (possibly none or all) of the other structural parameters determined during translation.
Hence, evaluation of a constant or structural parameter can never require solving systems of equations; they can always be sorted so that they can be solved one at a time with the natural causality (i.e., the declaration equation is used to determine the value of the component to which it belongs).
Expand Down

0 comments on commit b1b0dd4

Please sign in to comment.