Skip to content

Commit

Permalink
Restrict use of EventIndicator dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Junghanns committed Apr 15, 2021
1 parent ee1ca56 commit 55b6b9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/2_2_common_mechanisms.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1035,10 +1035,13 @@ where
** <<StepMode>> (Co-Simulation): The variables listed as elements <<Output>> of `<ModelStructure>` with a floating point type and <<variability>> = <<continuous>> or <<discrete>>.
Each continuous state derivative variable listed as elements <<ContinuousStateDerivative>> in `<ModelStructure>`, if present.

* latexmath:[\mathbf{v}_{\mathit{known}}] is the vector of <<input>> variables of function *f* which can be changed by the importer in the current state.
* latexmath:[\mathbf{v}_{\mathit{known}}] is the vector of <<input>> variables of function latexmath:[\mathbf{f}] which can be changed by the importer in the current state.
Details about which variables are in latexmath:[\mathbf{v}_{\mathit{known}}] are given in the description of element <<dependencies>> in <<ModelStructure>>.

* latexmath:[{\mathbf{v}_{\mathit{rest}}}] is the set of <<input>> variables and discrete-time states of function *f* which cannot be set by the importer in the current state, but in other states _[for example, discrete-time <<input,`inputs`>> in <<ContinuousTimeMode>>]_.
* latexmath:[{\mathbf{v}_{\mathit{rest}}}] is the set of <<input>> variables and discrete-time states of function latexmath:[\mathbf{f}] which cannot be set by the importer in the current state, but in other states _[for example, discrete-time <<input,`inputs`>> in <<ContinuousTimeMode>>]_.

* <<EventIndicator,`EventIndicators`>> are not be included among latexmath:[\mathbf{v}_{\mathit{unknonwn}}].
This is intentional as their dependencies listed in `<ModelStructure>` are intended for debugging purposes and not for partial derivatives.

_[The variable relationships are different in different states._
_For example, during <<ContinuousTimeMode>>, the partial derivate of a continuous-time output *y* with respect to discrete-time <<input,`inputs`>> is undefined, because discrete-time <<input,`inputs`>> cannot be set between events.]_
Expand Down
2 changes: 2 additions & 0 deletions docs/2_4_common_schema.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,8 @@ latexmath:[{\mathbf{v}_{\mathit{initialUnknowns}} := \mathbf{f}_{\mathit{init}}(

Since, <<output,`outputs`>>, continuous-time <<state,`states`>> and state derivatives are either present as knowns (if <<initial>> = <<exact>>) or as unknowns (if <<initial>> = <<approx>> or <<calculated>>), they can be inquired with <<get-and-set-variable-values,`fmi3Get{VariableType}`>> in <<InitializationMode>>.

<<EventIndicator,`EventIndicators`>> are available during <<InitializationMode>>, however their dependencies are intended for debugging purposes only (and not for connection with other FMU's), and therefore they must not be listed as <<InitialUnknown>>.

_[Example: Assume an FMU is defined in the following way:_

latexmath:[{(\mathbf{y}_{c+d}, \dot{\mathbf{x}}_c) := \mathbf{f}_{\mathit{init}}(\mathbf{x}_c, \mathbf{u}_{c+d}, t_0, \mathbf{p})}] +
Expand Down

0 comments on commit 55b6b9f

Please sign in to comment.