Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Validation of FMI 2.0 InitialUnknown indices #31

Open
ghost opened this issue May 16, 2018 · 0 comments
Open

Validation of FMI 2.0 InitialUnknown indices #31

ghost opened this issue May 16, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented May 16, 2018

The compliance checker does not validate indices used in unknowns in the ModelStructure/InitialUnknowns element of modelDescription.xml.

The FMI 2.0 standard (p. 60) specifies that InitialUnknowns is an

Ordered list of all exposed Unknowns in Initialization Mode. This list consists of all variables with
(1) causality = "output" and (initial="approx" or "calculated"), and
(2) causality = "calculatedParameter" and
(3) all continuous-time states and all state derivatives (defined with element from ) with initial="approx" or "calculated" [if a Co-Simulation FMU does not define the element, (3) cannot be present.].

However, the following example passes an XML check:

<ModelVariables>
  <ScalarVariable name="v1" valueReference="0" causality="parameter" variability="fixed" initial="exact">
    <Real start="0"/>
  </ScalarVariable>
  <ScalarVariable name="v2" valueReference="1" causality="parameter" variability="fixed" initial="exact">
    <Real start="0"/>
  </ScalarVariable>
</ModelVariables>
<ModelStructure>
 <InitialUnknowns>
    <Unknown index="1"/>
    <Unknown index="2"/>
  </InitialUnknowns>
</ModelStructure>

A check should be made that the listed unknowns are actually unknowns. This could also be extended to cover the knowns it depends on.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants