Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Henrik Tidefelt <henrikt@wolfram.com>
  • Loading branch information
HansOlsson and henrikt-ma committed Nov 4, 2021
1 parent 82fece0 commit 8ff88d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions chapters/classes.tex
Expand Up @@ -341,14 +341,15 @@ \subsection{Component Variability Prefixes discrete, parameter, constant}\label{
\begin{itemize}
\item
A variable \lstinline!vc! declared with \lstinline!constant!\indexinline{constant} prefix remains constant during transient analysis, with a value that is unaffected by the initialization problem.
This is called a constant, or constant variable.
This is called a \firstuse{constant}, or \firstuse{constant variable}\index{constant variable}\index{component variability!constant}.
\item
A variable \lstinline!vc! declared with the \lstinline!parameter!\indexinline{parameter} prefix remains constant during transient analysis, with a value determined by the initialization problem.
This is called a parameter, or parameter variable.
This is called a \firstuse{parameter}, or \firstuse{parameter variable}\index{parameter variable}\index{component variability!parameter}.
\item
A \emph{discrete-time} variable \lstinline!vd! is a variable declared with the \lstinline!discrete!\indexinline{discrete} prefix, or a variable without any prefix that is not a continuous-time variable.
It has a vanishing time derivative between events.
Note that this is not the same as saying that \lstinline!der(vd)=0! almost everywhere, as the derivative is not even defined at the events, and it is not legal to apply \lstinline!der! to discrete-time variables as they are not continuous.
Note that this is not the same as saying that \lstinline!der(vd)=0! almost everywhere, as the derivative is not even defined at the events.
It is not allowed to apply \lstinline!der! to discrete-time variables.
During transient analysis the variable can only change its value at event instants (see \cref{events-and-synchronization}).
\item
A \emph{continuous-time} variable is a \lstinline!Real! variable without any prefix that is not assigned in a \lstinline!when!-clause.
Expand Down
2 changes: 1 addition & 1 deletion chapters/equations.tex
Expand Up @@ -718,7 +718,7 @@ \section{Initialization, initial equation, and initial algorithm}\label{initiali
There is no special handling of inactive \lstinline!when!-statements during initialization, instead variables assigned in \lstinline!when!-statements are initialized using \lstinline!v := pre(v)! before the body of the algorithm (since they are discrete), see \cref{execution-of-an-algorithm-in-a-model}.
\end{nonnormative}

Further constraints, necessary to determine the initial values of all variables (depending on the variability of the variable, see \cref{component-variability-prefixes-discrete-parameter-constant} for definitions), can be defined in the following ways:
Further constraints, necessary to determine the initial values of all variables (depending on the component variability, see \cref{component-variability-prefixes-discrete-parameter-constant} for definitions), can be defined in the following ways:
\begin{enumerate}
\item
As equations in an \lstinline!initial equation!\indexinline{initial equation} section or as assignments in an \lstinline!initial algorithm!\indexinline{initial algorithm} section.
Expand Down

0 comments on commit 8ff88d7

Please sign in to comment.