Cases

class Cases "Cases"
    extends Modelica.Icons.Information;

    annotation (Documentation(info = "<html>\n\n<p>In the Modelica documentation sometimes different cases have to be distinguished. If the case distinction refers to Modelica parameters or variables (Boolean expressions) the comparisons should be written in the style of Modelica code within <code>&lt;code&gt;</code> and <code>&lt;/code&gt;</code>\n</p>\n\n<h5>Example 1</h5>\n\n<code>&lt;p&gt;If &lt;code&gt;useCage == true&lt;/code&gt;, a damper cage is considered in the model...&lt;/p&gt;</code>\n\n<p>appears as</p>\n\n<p>If <code>useCage == true</code>, a damper cage is considered in the model...</p>\n\n<p>\nFor more complex case scenarios a unordered list should be used. In this case only Modelica specific code segments and Boolean expressions.\n</p>\n\n<h5>Example 2</h5>\n\n<pre>\n&lt;ul&gt;\n  &lt;li&gt; If &lt;code&gt;useCage == true&lt;/code&gt;, a damper cage is considered in the model.\n       Cage parameters must be specified in this case.&lt;/li&gt;\n  &lt;li&gt; If &lt;code&gt;useCage == false&lt;/code&gt;, the damper cage is omitted.&lt;/li&gt;\n&lt;/ul&gt;</pre>\n\n<p>appears as</p>\n\n<ul>\n  <li> If <code>useCage == true</code>, a damper cage is considered in the model.\n       Cage parameters must be specified in this case.</li>\n  <li> If <code>useCage == false</code>, the damper cage is omitted.</li>\n</ul>\n\n<p>\nIn a more equation oriented case additional equations or code segments can be added.\n</p>\n\n<h5>Example 3</h5>\n\n<pre>\n&lt;ul&gt;\n  &lt;li&gt;if &lt;code&gt;usePolar == true&lt;/code&gt;, assign magnitude and angle to output &lt;br&gt;\n  &lt;!-- insert graphical representation of equations --&gt;\n  y[i,1] = sqrt( a[i]^2 + b[i]^2 ) &lt;br&gt;\n  y[i,2] = atan2( b[i], a[i] )\n  &lt;/li&gt;\n  &lt;li&gt;if &lt;code&gt;usePolar == false&lt;/code&gt;, assign cosine and sine to output &lt;br&gt;\n  &lt;!-- insert graphical representation of equations --&gt;\n  y[i,1] = a[i] &lt;br&gt;\n  y[i,2] = b[i]\n  &lt;/li&gt;\n&lt;/ul&gt;</pre>\n\n<p>appears as</p>\n\n<ul>\n  <li>if <code>usePolar == true</code>, assign magnitude and angle to output<br>\n\n  <img src=\"modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Cases/y_i1_polar.png\"\n       alt=\"y[i,1] = sqrt( a[i]^2 + b[i]^2 )\"><br>\n  <img src=\"modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Cases/y_i2_polar.png\"\n       alt=\"y[i,2] = atan2( b[i], a[i] )\">\n  </li>\n  <li>if <code>usePolar == false</code>, assign cosine and sine to output<br>\n  <img src=\"modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Cases/y_i1_rect.png\"\n       alt=\"y[i,1] = a[i]\"><br>\n  <img src=\"modelica://Modelica/Resources/Images/UsersGuide/Conventions/Documentation/Format/Cases/y_i2_rect.png\"\n       alt=\" y[i,2] = b[i]\">\n  </li>\n</ul>\n\n</html>"));
end Cases;