Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/examples/combi1d_modelDescription.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
...
<Float64 name="combitable1d_example " valueReference="1" causality="parameter"
start="1.0 2.0 4.0 7.0
2.0 3.0 2.0 5.0
3.0 4.0 1.0 2.0">
<Dimension start="3"/>
<Dimension start="4"/>
</Float64>
<Int64 name="InterpolationOrder" valueReference="2" causality="parameter" start="1" />
<Float64 name="in_x" valueReference="3" causality="input" start="2.0"/>
<Float64 name="out_v1" valueReference="4" causality="local" />
<Float64 name="out_v3" valueReference="5" causality="local" />
...
15 changes: 15 additions & 0 deletions docs/examples/combi1d_terminalsAndIcons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiTerminalsAndIcons fmiVersion="3.0">
<Terminals>
<Terminal name="map2d" terminalKind="org.fmi-standard.fmi-ls-struct.map.combitable1d" matchingRule="org.fmi-standard.fmi-ls-struct.map">
<TerminalMemberVariable variableName="combitable1d_example" memberName="x" variableKind="org.fmi-standard.fmi-ls-struct.map.domain" />
<TerminalMemberVariable variableName="in_x" memberName="in_x" variableKind="org.fmi-standard.fmi-ls-struct.domainInput" />
<TerminalMemberVariable variableName="combitable1d_example" memberName="v1" variableKind="org.fmi-standard.fmi-ls-struct.map.codomain" />
<TerminalMemberVariable variableName="out_v1" memberName="out_v1" variableKind="org.fmi-standard.fmi-ls-struct.map.codomainOutput" />
<TerminalMemberVariable variableName="combitable1d_example" memberName="v2" variableKind="org.fmi-standard.fmi-ls-struct.map.codomain" />
<TerminalMemberVariable variableName="combitable1d_example" memberName="v3" variableKind="org.fmi-standard.fmi-ls-struct.map.codomain" />
<TerminalMemberVariable variableName="out_v3" memberName="out_v3" variableKind="org.fmi-standard.fmi-ls-struct.map.codomainOutput" />
<TerminalMemberVariable variableName="interpolationOrder" memberName="interpolationOrder" variableKind="com.example.related" />
</Terminal>
</Terminals>
</fmiTerminalsAndIcons>
13 changes: 13 additions & 0 deletions docs/examples/combi2d_modelDescription.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
...
<Float64 name="combitable2d_example" valueReference="1" causality="parameter"
start=" 0 1.0 2.0 3.0
1.0 1.0 3.0 5.0
2.0 2.0 4.0 6.0">
<Dimension start="3"/>
<Dimension start="4"/>
</Float64>
<Int64 name="InterpolationOrder" valueReference="2" causality="parameter" start="1" />
<Float64 name="in_x" valueReference="3" causality="input" start="2.0"/>
<Float64 name="in_y" valueReference="4" causality="local" />
<Float64 name="out_v" valueReference="5" causality="local" />
...
14 changes: 14 additions & 0 deletions docs/examples/combi2d_terminalsAndIcons.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<fmiTerminalsAndIcons fmiVersion="3.0">
<Terminals>
<Terminal name="map2d" terminalKind="org.fmi-standard.fmi-ls-struct.map.combitable2d" matchingRule="org.fmi-standard.fmi-ls-struct.map">
<TerminalMemberVariable variableName="combitable2d_example" memberName="x" variableKind="org.fmi-standard.fmi-ls-struct.map.domain" />
<TerminalMemberVariable variableName="in_x" memberName="in_x" variableKind="org.fmi-standard.fmi-ls-struct.domainInput" />
<TerminalMemberVariable variableName="combitable2d_example" memberName="y" variableKind="org.fmi-standard.fmi-ls-struct.map.domain" />
<TerminalMemberVariable variableName="in_y" memberName="in_y" variableKind="org.fmi-standard.fmi-ls-struct.map.domainInput" />
<TerminalMemberVariable variableName="combitable2d_example" memberName="v" variableKind="org.fmi-standard.fmi-ls-struct.map.codomain" />
<TerminalMemberVariable variableName="out_v" memberName="out_v" variableKind="org.fmi-standard.fmi-ls-struct.map.codomainOutput" />
<TerminalMemberVariable variableName="interpolationOrder" memberName="interpolationOrder" variableKind="com.example.related" />
</Terminal>
</Terminals>
</fmiTerminalsAndIcons>
90 changes: 90 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ The licenses text can be found in the https://raw.githubusercontent.com/modelica

For many use cases, the grouping of variables gives the user a better overview about the usage of variables. For certain groupings the importing tool might be able to provide a more user-friendly interface.
FMUs might use maps/functions sampled on the vertices of a grid to calculate output values. The values at these sampling points and even the locations of the sampling points might get exposed as parameter variables of the FMU to allow calibrations. However, the FMI standard only defines n-dimensional array variable but doesn't define any relation between these variables. This layered standard defines how to group variables to represent maps.
E.g., CombiTable1D or CombiTable2D blocks of the Modelica standard library used within an FMU can be exposed with this approach.

This layered standard uses terminals of the FMI 3.0 standard to represent structures like maps by grouping variables in terminals. Terminals are used to group variables and already define means to connect its variables between FMUs. Such a connections could ensure that the same map values are used by different FMUs or allow one FMU to provide the map values to be used by other FMUs.

Expand Down Expand Up @@ -111,6 +112,12 @@ n-D lookup table:: In the context of this layered standard, an n-D lookup table
`org.fmi-standard.fmi-ls-struct.map.rectilinearGrid`::
for maps defined on the vertices of a rectilinear grid.

`org.fmi-standard.fmi-ls-struct.map.combitable1d`::
for 1-d maps defined on the vertices of a rectilinear grid, stored in a single matrix.

`org.fmi-standard.fmi-ls-struct.map.combitable2d`::
for 2-d maps defined on the vertices of a rectilinear grid, in a single matrix.

`org.fmi-standard.fmi-ls-struct.map.irregular`::
for maps defined by unstructured tuples of ("point cloud").

Expand Down Expand Up @@ -224,6 +231,89 @@ include::examples/terminalsAndIcons.xml[]



=== Referencing Modelica Standard Library Combitables

The Modelica Standard Library defines lookup tables which are stored in a single matrix (https://doc.modelica.org/om/Modelica.Blocks.Tables.html)


==== Referencing Modelica Standard Library CombiTable1d

===== Example


[[combitable1d_example]]
[cols="1,1,1,2"]
|====
|x.0
|v1
|v2
|v3

|1.0
|2.0
|4.0
|7.0

|2.0
|3.0
|2.0
|5.0

|3.0
|4.0
|1.0
|2.0
|====

[source, xml]
----
include::examples/combi1d_modelDescription.xml[]
----

The following example shows how to reference the Modelica Standard Library CombiTable1D matrix `combitable1d_example` in the TerminalsAndIcons.xml file:
[source, xml]
----
include::examples/combi1d_terminalsAndIcons.xml[]
----


==== Referencing Modelica Standard Library CombiTable2d

===== Example

[[combitable2d_example]]
[cols="1,1,1,2"]
|====
|
|1.0
|2.0
|3.0

|1.0
|1.0
|3.0
|5.0

|2.0
|2.0
|4.0
|6.0
|====

[source, xml]
----
include::examples/combi2d_modelDescription.xml[]
----

The following example shows how to reference the Modelica Standard Library CombiTable2D matrix `combitable2d_example` in the TerminalsAndIcons.xml file:
[source, xml]
----
include::examples/combi2d_terminalsAndIcons.xml[]
----





== Maps sampled on irregular grids ("Point Cloud")

Expand Down