modelica-tools / FMUComplianceChecker

FMI Compliance Checker for validation of FMUs 1.0 and 2.0
BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

Check for mandatory elements in the model structure. #23

Open modelica-trac-importer opened 6 years ago

modelica-trac-importer commented 6 years ago

Reported by cbertsch on 8 Jan 2017 08:06 UTC The FMI Compliance Checker 2.0.3 does currently not check for mandatory elements of the model structure in the modeldescription.xml

p.58 of the FMI 2.0 Standard: Outputs: Ordered list of all outputs, in other words a list of ScalarVariable indices where every corresponding ScalarVariable must have causality = "output" (and every variable with causality=”output” must be listed here).

Currently it is not checked, if the "outputs" are present in model structure. If the outputs are defined in the model structure, it is not checked, if the provided index really corresponds to an output. It is not checked if defined dependencies follow the rules defined on p. 61 of the FMI 2.0 standard.

E.g. instead of the following modeldescription.xml (part)

...

<ModelVariables>
  <ScalarVariable name="a_" valueReference="0" causality="input" variability="continuous" initial="approx">
    <Real start="1"/>
  </ScalarVariable>
  <ScalarVariable name="b_" valueReference="1" causality="input" variability="continuous" initial="approx">
    <Real start="2"/>
  </ScalarVariable>
  <ScalarVariable name="c_" valueReference="2" causality="output" variability="continuous" initial="calculated">
    <Real />
  </ScalarVariable>
</ModelVariables>

<ModelStructure>
  <Outputs>
    <Unknown index="3" dependencies="1 2"/>
  </Outputs>
</ModelStructure>

...

also

<ModelStructure>
</ModelStructure>

or

<ModelStructure>
  <Outputs>
    <Unknown index="1" dependencies="2 3"/>
  </Outputs>
</ModelStructure>

are accepted by the current compliance checker.

The same as for outputs is also true for the derivatives.


Migrated-From: https://trac.fmi-standard.org/ticket/400

modelica-trac-importer commented 6 years ago

Comment by cbertsch on 3 May 2017 19:36 UTC Additionally, the compliance checker currently does not check, if initial unkwnowns are defined according to p.60 of the FMI 2.0 specification (e.g. for varibles causality = "output" and (initial="approx" or "calculated")