diff --git a/docs/2_4_common_schema.adoc b/docs/2_4_common_schema.adoc index 165ee3c09..1a6eb6d91 100644 --- a/docs/2_4_common_schema.adoc +++ b/docs/2_4_common_schema.adoc @@ -940,7 +940,7 @@ The algebraic relationship to the <> can be defined via the <> and their <>, <>, <> or <>. +* continuous <> and their <>, <>, <> or <>. These variables are listed in the ``. + * [[localClock,`local clock`]] internal, intermediate variables or local clocks which can be read for debugging purposes and are not listed in the ``. @@ -1071,6 +1071,17 @@ Variables with <> <> must not be marked with <> and this attribute is a value reference to the variable with the previous value. +Only clocked variables (they are listed in at least one of the <> lists) may have the <> attribute. +Only variables with <> may have a previous value. + +_[For example, if `previous == 3` for variable `8`, then variable `3` is the previous value of variable `8`. See also <>._ +_Note: This is reverse compared to the <> attribute.]_ + |==== If <> is not present, its value is defined by <> based on the values of <> and <> (default [.underline]#underlined#): @@ -1675,11 +1686,13 @@ Beside the knowns the derivatives also depend on the "frozen" variables (= varia The functional dependency is defined as (dependencies of variables that are fixed in Event and <> and at communication points are not shown): + latexmath:[{\dot{\mathbf{x}_c} := \mathbf{f}_{\mathit{der}}(\mathbf{x}_c, \mathbf{u}_c, \mathbf{u}_d, t, \mathbf{p}_{\mathit{tune}})}] -|`DiscreteTimeState` +|`ClockedState` | -[[DiscreteTimeState,``]] -XXX // TODO: Add description, see #1287 on github. + -XXX // TODO: This should likely be Locals (ask ZIrina), to allow dependency definitions for modelPartitions (to input clocks) for all local variables +[[ClockedState,``]] +A <> is part of the discrete state of a model partition and represented by a <> variable. +To which clock or clocks it belongs is described in <>. +Each <> must have the attribute <> to represent the previous value of this <>. +All <> must have <>. |`InitialUnknown` | @@ -1722,11 +1735,19 @@ _The ordering of the variables in this list is defined by the exporting tool.]_ For Co-Simulation, elements <> are ignored. _[If an FMU supports both Model Exchange and Co-Simulation, then the <> elements might be present, since it is needed for Model Exchange.]_ +|`Clock` +| +[[ClockElement,``]] +List of all clocks and their clocked variables. +All variables referenced by these lists must have <>. +A clocked variable my depend on multiple clocks and may therefore be listed in multiple <> elements. +_[More rigorous importers requiring a variable to be dependent on a single clock can reject FMUs violating this restriction.]_ + |==== -Elements <>, <>, <> and <> have the following attributes: +Elements <>, <>, <>, <>, <> and <> have (partially) the following attributes: -.<>, <>, <> and <> attribute details. +.<>, <>, <>, <>, <> and <> attribute details. [[table-output-der-initialUknown-details]] [cols="1,5", options="header"] |==== @@ -1787,6 +1808,12 @@ Only for floating point type unknowns latexmath:[{\mathbf{v}_{\mathit{unknown}}} `=` <>: tunable factor, latexmath:[{p \cdot \mathbf{v}_{\mathit{known},i}}] where latexmath:[{p}] is an expression that is evaluated before <> is called and in <> due to event handling (ME) or at a communication point (CS and SE) `=` <>: discrete factor, latexmath:[{d \cdot \mathbf{v}_{\mathit{known},i}}] where latexmath:[{d}] is an expression that is evaluated before <> is called and in <> due to an external or internal event or at a communication point (CS and SE). + +|`clockedVariables` +| +[[clockedVariables, `clockedVariables`]] +This element is only available with the <> element and is a list of value references indicating clocked variables depending on this clock. + |==== _[Example 1:_ diff --git a/docs/images/schema/Binary.png b/docs/images/schema/Binary.png index 7dde7b08c..56a328fda 100644 Binary files a/docs/images/schema/Binary.png and b/docs/images/schema/Binary.png differ diff --git a/docs/images/schema/Boolean.png b/docs/images/schema/Boolean.png index 5089c6ad6..26598b466 100644 Binary files a/docs/images/schema/Boolean.png and b/docs/images/schema/Boolean.png differ diff --git a/docs/images/schema/Clock.png b/docs/images/schema/Clock.png index 12451de2d..a0d05ca6c 100644 Binary files a/docs/images/schema/Clock.png and b/docs/images/schema/Clock.png differ diff --git a/docs/images/schema/Enumeration.png b/docs/images/schema/Enumeration.png index b23c12db8..2579e59a1 100644 Binary files a/docs/images/schema/Enumeration.png and b/docs/images/schema/Enumeration.png differ diff --git a/docs/images/schema/Float64.png b/docs/images/schema/Float64.png index 6e79d4884..9d5ca9e2b 100644 Binary files a/docs/images/schema/Float64.png and b/docs/images/schema/Float64.png differ diff --git a/docs/images/schema/Int32.png b/docs/images/schema/Int32.png index 5bb5536f7..48ea1a6f2 100644 Binary files a/docs/images/schema/Int32.png and b/docs/images/schema/Int32.png differ diff --git a/docs/images/schema/ModelStructure.png b/docs/images/schema/ModelStructure.png index d37592019..aed57e95d 100644 Binary files a/docs/images/schema/ModelStructure.png and b/docs/images/schema/ModelStructure.png differ diff --git a/docs/images/schema/fmi3VariableBase.png b/docs/images/schema/fmi3VariableBase.png index 0e1f17308..d34912d7a 100644 Binary files a/docs/images/schema/fmi3VariableBase.png and b/docs/images/schema/fmi3VariableBase.png differ diff --git a/schema/fmi3ModelDescription.xsd b/schema/fmi3ModelDescription.xsd index 5a1d3633f..d46035ce2 100644 --- a/schema/fmi3ModelDescription.xsd +++ b/schema/fmi3ModelDescription.xsd @@ -94,12 +94,28 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + - - - + + + + + + + + + + + + + + + + + + + diff --git a/schema/fmi3Variable.xsd b/schema/fmi3Variable.xsd index e0db4b1c9..ce7fe82e8 100644 --- a/schema/fmi3Variable.xsd +++ b/schema/fmi3Variable.xsd @@ -350,6 +350,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +