Skip to content
Open
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: 5 additions & 0 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,11 @@ \subsection{Discrete-Time Variables}\label{discrete-time-variables}
A \lstinline!Real! variable assigned in a \lstinline!when!-clause is a discrete-time variable, even though it was not declared with the prefix \lstinline!discrete!.
A \lstinline!Real! variable not assigned in any \lstinline!when!-clause and without any type prefix is a continuous-time variable.

The determination of whether a variable is assigned in \lstinline!when!-clause requires evaluating the controlling conditions of any enclosing \lstinline!if!-equations and \lstinline!for!-equations, \cref{where-a-when-equation-may-occur}.
\begin{nonnormative}
Checking whether a \lstinline!Real! variable declared as \lstinline!discrete! is assigned in a \lstinline!when!-clause for other valid values of controlling conditions is a quality of implementation issue for tools.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we every say … for tools when talking out quality of implementation:

Suggested change
Checking whether a \lstinline!Real! variable declared as \lstinline!discrete! is assigned in a \lstinline!when!-clause for other valid values of controlling conditions is a quality of implementation issue for tools.
It is a quality of implementation to check that a variable declared as \lstinline!discrete! is assigned in a \lstinline!when!-clause also for other valid values of controlling conditions.

\end{nonnormative}

The default variability for \lstinline!Integer!, \lstinline!String!, \lstinline!Boolean!, or \lstinline!enumeration! variables is discrete-time, and it is not possible to declare continuous-time \lstinline!Integer!, \lstinline!String!, \lstinline!Boolean!, or \lstinline!enumeration! variables.

\begin{nonnormative}
Expand Down
1 change: 1 addition & 0 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ \subsection{If-Equations}\label{if-equations}
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).
Additional restrictions apply in combination with \lstinline!when!-equations, see \cref{where-a-when-equation-may-occur} and \cref{equations-within-when-equations}.

\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