Skip to content

Commit

Permalink
Merge pull request modelica#2475 from henrikt-ma/clarify/impure-param…
Browse files Browse the repository at this point in the history
…eter-binding

Clarify the consequence of using impure function in binding equation for parameter
  • Loading branch information
HansOlsson committed Feb 11, 2020
2 parents 7b2df65 + aa060a9 commit 6700c85
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions chapters/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,14 @@ \section{Pure Modelica Functions}\doublelabel{pure-modelica-functions}
\item
in initial equations and initial algorithms,
\item
in bindings for variables declared as parameter -- which is seen as
syntactic sugar for having a parameter with fixed=false and the
binding as an initial equation \emph{{[}thus there is no guarantee
that parameter is equal to the impure function call after
initialization{]}} -- and in constructing external objects.
in binding equations for components declared as parameter -- which is seen as
syntactic sugar for having a parameter with \lstinline!fixed=false! and the
binding as an initial equation \emph{{[}thus, evaluation of the same function
call at a later time during simulation is not guaranteed to result in the same
value as when the parameter was initialized, seemingly breaking the declaration
equation{]}}
\item
in binding equations for external objects.
\end{itemize}

For initial equations, initial algorithms, and bindings it is an error
Expand Down

0 comments on commit 6700c85

Please sign in to comment.