Skip to content

Commit

Permalink
Update chapters/statemachines.tex
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 25, 2020
1 parent fe56f44 commit 6180d5c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion chapters/statemachines.tex
Expand Up @@ -439,7 +439,13 @@ \subsection{Merging Connections to Multiple Outputs}\label{merging-connections-t
with \lstinline!y!\textsubscript{i} being outputs from different states of the state-machine and \lstinline!u!\textsubscript{i} being other causal variables.
The semantics is defined similarly to \cref{merging-variable-definitions}:
\begin{lstlisting}[language=modelica,escapechar=!]
v = if activeState(state!\textsubscript{1}!) then y!\textsubscript{1}! elseif activeState(state!\textsubscript{2}!) then y!\textsubscript{2}! elseif ... else last(v);
v = if activeState(state!\textsubscript{1}!) then
y!\textsubscript{1}!
elseif activeState(state!\textsubscript{2}!) then
y!\textsubscript{2}!
elseif $\ldots$
else
last(v);
u!\textsubscript{1}! = v
u!\textsubscript{2}! = v
...
Expand Down

0 comments on commit 6180d5c

Please sign in to comment.