.Modelica.UsersGuide.Conventions.Documentation.Format.Cases

Information

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> and </code>

Examples

Example 1

<p>If <code>useCage == true</code>, a damper cage is considered in the model...</p>

appears as

If useCage == true, a damper cage is considered in the model...

For more complex case scenarios, an unordered list should be used. In this case only Modelica specific code segments and Boolean expressions.

Example 2
<ul>
  <li> If <code>useCage == true</code>, a damper cage is considered in the model.
       Cage parameters must be specified in this case.</li>
  <li> If <code>useCage == false</code>, the damper cage is omitted.</li>
</ul>

appears as

In a more equation oriented case, additional equations or code segments can be added.

Example 3
<ul>
  <li>if <code>usePolar == true</code>, assign magnitude and angle to output <br>
  <!-- insert graphical representation of equations -->
  y[i,1] = sqrt( a[i]^2 + b[i]^2 ) <br>
  y[i,2] = atan2( b[i], a[i] )
  </li>
  <li>if <code>usePolar == false</code>, assign cosine and sine to output <br>
  <!-- insert graphical representation of equations -->
  y[i,1] = a[i] <br>
  y[i,2] = b[i]
  </li>
</ul>

appears as


Generated at 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f