WOLFRAM SYSTEM MODELER

Cases

Cases

Wolfram Language

In[1]:=
SystemModel["Modelica.UsersGuide.Conventions.Documentation.Format.Cases"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

  • 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]