Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification for matching #1808

Merged
merged 11 commits into from
Oct 12, 2022
12 changes: 10 additions & 2 deletions docs/2_4_common_schema.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ _If more space is required, the folder <<license-information,`licenses`>> should
|Optional date and time when the XML file was generated.
The format is a subset of `dateTime` and should be: `YYYY-MM-DDThh:mm:ssZ` (with one `T` between date and time; `Z` characterizes the Zulu time zone, in other words, Greenwich meantime) _[for example `2009-12-08T14:33:22Z`, according to ISO 8601]_.

|[[variableNamingConvention,`variableNamingConvention`]]<<variableNamingConvention>>
|[[variableNamingConvention,`Convention`]]<<variableNamingConvention>>
|Defines whether the variable names in <<ModelVariables>> and in `<TypeDefinitions>` follow the `flat` or `structured` convention as defined in <<namingSection>>.

|====
Expand Down Expand Up @@ -1927,7 +1927,15 @@ _Examples for `terminalKind`: `StandardXXX_Mechanical_Translational`, `Modelica.

_The structured naming convention of the <<ModelVariables>> is independent from the terminal names and member variable names._

_A tool may choose to connect terminals with a different or unknown `terminalKind`, if the `matchingRule` matches.]_
_A tool may choose to connect terminals with a different or unknown `terminalKind`, if the `matchingRule` matches._

_A tool may choose to take the structured naming convention of variable names into account when matching terminals._
_This can for example be used to allow matching between terminals employing arrays mapped to scalar variables using structured naming convention ("naming convention arrays"), and those using native FMI 3.0 arrays, as in the following example:_

pmai marked this conversation as resolved.
Show resolved Hide resolved
_Assume that an (FMI 3.0) FMU has a one-dimensional array variable `x` of length 3 as member variable of a terminal and is connected to another (FMI 2.0 or FMI 3.0) FMU supporting structured naming convention, which has scalar variables `x[1]`, `x[2]`, `x[3]` as member variables of a terminal._
_Then `x[1]`, `x[2]`, `x[3]` are interpreted as a "naming convention array" with name `x`, which "matches" the array variable `x` of the first FMU, in name-based matching._
_Similarly the notional "naming convention array" `x` would participate in sequence-based matching as a single notional variable in the place of the underlying scalar variables._
_]_

[[section-terminalvars]]
====== Terminal Member Variable
Expand Down