Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore init for clocked discretized. #3577

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions chapters/synchronous.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1400,13 +1400,13 @@ \subsection{Inferencing of solverMethod}\label{inferencing-of-solvermethod}

\section{Initialization of Clocked Partitions}\label{initialization-of-clocked-partitions}

The standard scheme for initialization of Modelica models does not apply for clocked base-partitions.
The standard scheme for initialization of Modelica models does not apply for discrete-time sub-partitions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't we drop the sub here? I can't find a single example of discrete-time sub-partition in the current text?

Suggested change
The standard scheme for initialization of Modelica models does not apply for discrete-time sub-partitions.
The standard scheme for initialization of Modelica models does not apply for discrete-time partitions.

Instead, initialization is performed in the following way:
\begin{itemize}
\item
Variables in clocked partitions cannot be used in initial equation or initial algorithm sections.
Variables in discrete-time sub-partitions cannot be used in initial equation or initial algorithm sections.
\item
Attribute \lstinline!fixed! cannot be applied to variables in clocked partitions.
Attribute \lstinline!fixed! cannot be applied to variables in discrete-time sub-partitions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we really allow fixed to be applied to clocked states in clocked discretized continuous-time partitions? Wouldn't that conflict with fixed already being defined for these variables?

The attribute \lstinline!fixed! is true for variables to which \lstinline!previous! is applied, otherwise false.
Copy link
Collaborator

Choose a reason for hiding this comment

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

While we are at it, shouldn't we avoid the problem when previous is applied to a parameter or constant?

Suggested change
The attribute \lstinline!fixed! is true for variables to which \lstinline!previous! is applied, otherwise false.
The attribute \lstinline!fixed! is true for clocked states, otherwise false.

\end{itemize}

Expand Down