Skip to content

Commit

Permalink
More operator mentions
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Jun 2, 2020
1 parent 5d9fa9d commit b59318d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
3 changes: 1 addition & 2 deletions chapters/classes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,7 @@ \subsection{Component Variability Prefixes discrete, parameter, constant}\double
A \emph{discrete-time} variable \lstinline!vd! 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 the \lstinline!der()! operator
to discrete-time variables as they are not continuous. During transient analysis the variable
to apply \lstinline!der()! to discrete-time variables as they are not continuous. During transient analysis the variable
can only change its value at event
instants (see \autoref{events-and-synchronization}).
\item
Expand Down
5 changes: 2 additions & 3 deletions chapters/dae.tex
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ \chapter{Modelica DAE Representation}\doublelabel{modelica-dae-representation}

\end{longtable}

For simplicity, the special cases of the \lstinline!noEvent()! operator and of the
\lstinline!reinit()! operator are not contained in the equations above and are not
discussed below.
For simplicity, the special cases of \lstinline!noEvent! and \lstinline!reinit! are not contained in the equations
above and are not discussed below.

The generated set of equations is used for simulation and other analysis
activities. Simulation means that an initial value problem is solved,
Expand Down
14 changes: 7 additions & 7 deletions chapters/equations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -628,10 +628,10 @@ \section{Events and Synchronization}\doublelabel{events-and-synchronization}

Relations are taken literally also during continuous integration, if the
relation or the expression in which the relation is present, are the
argument of the \lstinline!noEvent(..)! function. The \lstinline!smooth(p,x)! operator also
argument of \lstinline!noEvent!. \lstinline!smooth! also
allows relations used as argument to be taken literally. The \lstinline!noEvent!
feature is propagated to all subrelations in the scope of the \lstinline!noEvent!
function. For \lstinline!smooth! the liberty to not allow literal evaluation is
application. For \lstinline!smooth! the liberty to not allow literal evaluation is
propagated to all subrelations, but the smooth-property itself is not
propagated.

Expand Down Expand Up @@ -755,8 +755,8 @@ \section{Initialization, initial equation, and initial algorithm}\doublelabel{in
all equations and algorithms that are utilized in the intended operation
(such as simulation or linearization). The equations of a
when-clause are active during initialization, if and only if they are
explicitly enabled with the \lstinline!initial()! operator; and only in one of the
two forms \lstinline!when initial() then! or \lstinline!when {...,initial(),...} then!
explicitly enabled with \lstinline!initial()!; and only in one of the
two forms \lstinline!when initial() then! or \lstinline[mathescape=true]!when {$\ldots$, initial(), $\ldots$} then!
(and similarly for algorithms see below). In this case, the when-clause equations remain active during the
whole initialization phase. In case of a
\lstinline!reinit(x, expr)! being active during initialization (due to being inside
Expand All @@ -770,8 +770,8 @@ \section{Initialization, initial equation, and initial algorithm}\doublelabel{in
\end{nonnormative}

The algorithmic statements within a when-statement are active during initialization, if and only they are
explicitly enabled with the \lstinline!initial()! operator; and only in one of the
two forms \lstinline!when initial() then! or \lstinline!when {...,initial(),...} then!.
explicitly enabled with \lstinline!initial()!; and only in one of the
two forms \lstinline!when initial() then! or \lstinline[mathescape=true]!when {$\ldots$, initial(), $\ldots$} then!.
In this case, the algorithmic statements within the when-statement remain active during the whole initialization phase.

\begin{nonnormative}
Expand Down Expand Up @@ -861,7 +861,7 @@ \section{Initialization, initial equation, and initial algorithm}\doublelabel{in
It may be difficult for a user to figure out how many initial equations have to be added, especially if the system has a higher index. A tool may add or remove initial equations
automatically such that the resulting system is structurally nonsingular. In these cases diagnostics are appropriate since the result is not unique and may not be what the user
expects. A missing initial value of a discrete variable which does not influence the simulation result, may be automatically set to the start value or its default without
informing the user. For example, variables assigned in a when-clause which are not accessed outside of the when-clause and where the \lstinline!pre()! operator is not explicitly
informing the user. For example, variables assigned in a when-clause which are not accessed outside of the when-clause and where \lstinline!pre! is not explicitly
used on these variables, do not have an effect on the simulation.
\end{nonnormative}

Expand Down
3 changes: 1 addition & 2 deletions chapters/statements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -471,9 +471,8 @@ \subsubsection{Defining When-Statements by If-Statements}\doublelabel{defining-w
...
end when;
\end{lstlisting}
is similar to the following special if-statement, where \lstinline!Boolean b1[N];! and \lstinline!Boolean b2;! are necessary because the \lstinline!edge()! operator can
is similar to the following special if-statement, where \lstinline!Boolean b1[N];! and \lstinline!Boolean b2;! are necessary because \lstinline!edge! can
only be applied to variables

\begin{lstlisting}[language=modelica]
Boolean b1[N](start={x.start>1, ...,
y.start>p});
Expand Down
8 changes: 4 additions & 4 deletions chapters/stream.tex
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o
inStream($m_{i}$.c.h_outflow) = $\mathit{h\_mix\_in}_{i}$;
\end{lstlisting}

Note that the result of the
\lstinline[mathescape=true]!inStream($m_{i}$.c.h_outflow)! operator is different
Note that the result of
\lstinline[mathescape=true]!inStream($m_{i}$.c.h_outflow)! is different
for each port $i$, because the assumption of flow entering the port is
different for each of them.

Expand Down Expand Up @@ -392,7 +392,7 @@ \section{Stream Operator inStream and Connection Equations}\doublelabel{stream-o

\section{Stream Operator actualStream}\doublelabel{stream-operator-actualstream}

The \lstinline!actualStream(v)! operator is provided for convenience, in
\lstinline!actualStream! is provided for convenience, in
order to return the actual value of the stream variable, depending on
the actual flow direction. The only argument of this built-in operator
needs to be a reference to a stream variable. The operator is
Expand All @@ -417,7 +417,7 @@ \section{Stream Operator actualStream}\doublelabel{stream-operator-actualstream}
Therefore, a tool might infer that the expression is \lstinline!smooth(0, ...)!
automatically, and decide whether or not to generate an event. If a user
wants to avoid events entirely, he/she may enclose the right-hand side
of (1) with the \lstinline!noEvent()! operator.
of (1) with \lstinline!noEvent!.

Equations like (2) might be used for monitoring purposes (e.g.
plots), in order to inspect what the actual enthalpy of the fluid
Expand Down

0 comments on commit b59318d

Please sign in to comment.