Cases

Cases

    Cases

Library

Modelica/UsersGuide/Conventions/Documentation/Format

Description

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>

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 a 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

  • If useCage == true, a damper cage is considered in the model. Cage parameters must be specified in this case.
  • If useCage == false, the damper cage is omitted.

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

  • if usePolar == true, assign magnitude and angle to output
    y[i,1] = sqrt( a[i]^2 + b[i]^2 )
    y[i,2] = atan2( b[i], a[i] )
  • if usePolar == false, assign cosine and sine to output
    y[i,1] = a[i]
     y[i,2] = b[i]