WSMLink`
WSMLink`

ModelicaConversion

ModelicaConversion is replaced by DotName.

ModelicaConversion

is an option for WSMModelData and WSMFindEquilibrium that specifies the conversion rule for Modelica variables.

Details and Options

  • With ModelicaConversion->Automatic, the "Modelica" setting is used.
  • Setting ModelicaConversion->"Modelica" uses the conversions:
  • "a.b"ab
    "a_b"ab
    "a.der(b)"ab'
    "a[1]"a1
    "a[1,2]"a1¸2
    dummy derivative of "a"dera
  • Setting ModelicaConversion->"Short" converts states to s[i], algebraic variables to a[i], input variables to i[i], and parameters to p[i].
  • {{"v1"->v1,},def} converts the Modelica name "vi" to the symbol vi and remaining variables according to def, as above.
  • The setting {"v1"->v1,} is interpreted as {{"v1"->v1,},Automatic}.

Examples

open allclose all

Basic Examples  (4)

Load Wolfram System Modeler Link:

Convert to symbols similar to Modelica naming:

Compare with the short naming:

Specify custom naming of two variables:

Control naming of output from WSMFindEquilibrium:

Scope  (3)

Each element in arrays is represented as one variable:

Indices are represented with x¸y:

Use custom naming for one variable and "Short" for the rest:

Applications  (1)

Get the equations of a model, renaming parameter c:

Replace parameters by their numeric values, keeping the renamed c:

Solve the system for different c: