FMIVariable Naming

Introduction | Class Browser | Class Window | Graphical Views | Modelica Text View | Component Browser | Variable Views | Reliability View | Messages View | Kernel Command View | Documentation Center | Functional Mock-up Interface | Keyboard Shortcuts | Kernel Commands

Most modeling tools have rules for variable naming and/or reserve some characters to have a certain meaning. As an example, in Modelica, the dot in a.b indicates a hierarchical structure where b is a component of a. These rules and reservations can differ between software, and consequently imported FMUs might contain variables and parameters that need to be renamed in the Modelica model wrapper.

This chapter contains tables to be used as a guide to understanding how variable names are mapped during FMU import in SystemModeler. Each table shows a set of example names and how they are mapped for different combinations of variable naming convention and allowed quoting (as described in this section). The last table contains examples of hard name mangling, which is relevant to the Variables that need name mangling option in the FMU Import dialog.

Mapping Tables

FMU name
Wrapper variable
Wrapper start parameter
xxx_start_
x_x__x___start_
åmangledmangled
1_1_x'1_1_x''1_1_x_start_'
w.x.yw.x.yw.x.y_start_
v[1,1]v[1,1]v_start_[1,1]
u[1].v[1]u[1].v[1]u[1].v_start_[1]
der(x)'der(x)''der(x)_start_'
der(x,2)'der(x,2)''der(x,2)_start_'
'x'mangledmangled

Variable naming convention: Structured; Allow use of quoted Modelica identifier for imported variables: yes.

FMU name
Wrapper variable
Wrapper start parameter
xxx_start_
x_x__x___start_
åmangledmangled
1_1_xmangledmangled
w.x.yw.x.yw.x.y_start_
v[1,1]v[1,1]v_start_[1,1]
u[1].v[1]u[1].v[1]u[1].v_start_[1]
der(x)x_derx_der__start_
der(x,2)x_der2_x_der2__start_
'x''x''x_start_'

Variable naming convention: Structured; Allow use of quoted Modelica identifier for imported variables: no.

FMU name
Wrapper variable
Wrapper start parameter
xxx_start_
x_x__x___start_
åmangledmangled
1_1_x'1_1_x''1_1_x_start_'
w.x.y'w.x.y''w.x.y_start_'
v[1,1]'v[1,1]''v[1,1]_start_'
u[1].v[1]'u[1].v[1]''u[1].v[1]_start_'
der(x)'der(x)''der(x)_start_'
der(x,2)'der(x,2)''der(x,2)_start_'
'x'mangledmangled

Variable naming convention: Flat; Allow use of quoted Modelica identifier for imported variables: yes.

FMU name
Wrapper variable
Wrapper start parameter
xxx_start_
x_x__x___start_
åmangledmangled
1_1_xmangledmangled
w.x.ymangledmangled
v[1,1]mangledmangled
u[1].v[1]mangledmangled
der(x)mangledmangled
der(x,2)mangledmangled
'x''x''x_start_'

Variable naming convention: Structured; Allow use of quoted Modelica identifier for imported variables: no.

FMU name
Wrapper variable
Wrapper start parameter
1_1_x_x___1__x_mangled__x___1__x_mangled__start
w.x.yw_u_x_u_y_mangled_w_u_x_u_y_mangled__start
v[1,1]v_Bd_1_s_1_Bf__mangled_v_Bd_1_s_1_Bf__mangled__start
der(x)der_o_x_p__mangled_der_o_x_p__mangled__start
'x'_n_x_n__mangled__n_x_n__mangled__start_
å_Dr__mangled__Dr__mangled__start_

Hard name mangling examples.

Introduction | Class Browser | Class Window | Graphical Views | Modelica Text View | Component Browser | Variable Views | Reliability View | Messages View | Kernel Command View | Documentation Center | Functional Mock-up Interface | Keyboard Shortcuts | Kernel Commands