Skip to content

Commit 6bcd97a

Browse files
authored
Merge pull request #3645 from henrikt-ma/absoluteValue-default
Make absoluteValue inferred by default
2 parents 6f40bc0 + 4599b81 commit 6bcd97a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

chapters/annotations.tex

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,12 +1529,18 @@ \section{Graphical User Interface}\label{annotations-for-the-graphical-user-inte
15291529
\end{lstlisting}\end{synopsis}
15301530
\begin{semantics}
15311531
Allowed for simple types and components of a simple types.
1532-
If \lstinline!false!, then the variable defines a relative quantity, and if \lstinline!true! an absolute quantity.
1532+
If \lstinline!false!, then the component defines a relative quantity, and if \lstinline!true! an absolute quantity.
1533+
When converting between units (e.g., in plots and where parameters are edited), the unit offset must be ignored for relative quantities.
1534+
The annotation is inherited in the sense that when \lstinline!absoluteValue! is defined for a simple type, it also applies derived classes.
1535+
When \lstinline!absoluteValue! is defined for a simple type, it also applies to components declared with the type.
1536+
1537+
When \lstinline!absoluteValue! of a component is not determined by an annotation (possibly through inheritance), the \lstinline!absoluteValue! status may be inferred by the tool.
1538+
If the \lstinline!absoluteValue! of a component is neither determined by annotation nor inference, unit conversions that would differ depending on \lstinline!absoluteValue! cannot be performed.
15331539

15341540
\begin{nonnormative}
1535-
When converting between units (in the user-interface for plotting and entering parameters), the unit offset must be ignored for a variable defined with annotation \lstinline!absoluteValue = false!.
1536-
This annotation is used in the Modelica Standard Library, for example in \lstinline!Modelica.Units.SI! for the type definition \lstinline!TemperatureDifference!.
1537-
For most types there is no unit offset and the annotation is not needed for them.
1541+
For most quantities there are no units with offset, and the annotation is not needed.
1542+
For a component where unit conversions involving offsets could be of interest (mainly temperatures), ensuring that \lstinline!absoluteValue! is determined by an annotation (typically by means of using a type where it has been specified) may reduce impact of quality-of-implementation in tool ability to infer \lstinline!absoluteValue!.
1543+
Example applications of this annotation can be found among the type definitions in the \lstinline!Modelica.Units! package of the Modelica Standard Library, such as \lstinline!TemperatureDifference!.
15381544
\end{nonnormative}
15391545
\end{semantics}
15401546
\end{annotationdefinition}

0 commit comments

Comments
 (0)