Opened 6 years ago

Closed 6 years ago

#5219 closed defect (fixed)

Wrong outputs in modelDescription.xml

Reported by: Lennart Ochel Owned by: Lennart Ochel
Priority: blocker Milestone: 1.13.0
Component: FMI Version: v1.13.0-dev-nightly
Keywords: Cc: Adrian Pop

Description (last modified by Lennart Ochel)

FMUs generated from the attached Modelica model (which is using the PlanarMechanics library) contain 3 variables that are marked as output:

<!-- Index of variable = "14" -->
  <ScalarVariable
    name="der(speed)"
    valueReference="13"
    variability="continuous"
    causality="output"
    initial="exact">
    <Real start="0.0"/>
  </ScalarVariable>
  <!-- Index of variable = "401" -->
  <ScalarVariable
    name="position"
    valueReference="400"
    variability="continuous"
    causality="output"
    initial="exact">
    <Real start="0.0"/>
  </ScalarVariable>
  <!-- Index of variable = "420" -->
  <ScalarVariable
    name="speed"
    valueReference="419"
    variability="continuous"
    causality="output"
    initial="exact">
    <Real start="0.0"/>
  </ScalarVariable>

The Outputs section of the ModelStructure definition list only two of them:

      <Unknown index="401" dependencies="1" dependenciesKind="dependent" />
      <Unknown index="420" dependencies="2" dependenciesKind="dependent" />

The ModelStructure seem to be correct, but the entiremodelDescription.xml becomes invalid due to the previously defined third output.

Attachments (1)

issue_B.mo (2.9 KB ) - added by Lennart Ochel 6 years ago.

Download all attachments as: .zip

Change History (6)

by Lennart Ochel, 6 years ago

Attachment: issue_B.mo added

comment:1 by Lennart Ochel, 6 years ago

Description: modified (diff)

comment:2 by Lennart Ochel, 6 years ago

Owner: set to Lennart Ochel
Status: newaccepted

comment:3 by Lennart Ochel, 6 years ago

The problem comes from the index reduction, which introduces dummy states derivatives and assigns the causality of the correspondent dummy state to it.

comment:4 by Lennart Ochel, 6 years ago

The issue is addressed in OpenModelica/OMCompiler#2788.

comment:5 by Lennart Ochel, 6 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.