﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2764	ModelStructure with wrong dependencies for states and without dependencies for outputs	rfranke@…	Willi Braun	"Using the current nightly build 1.9.1+dev (r21649), the following model

{{{
within ;
model DIC ""Double Integrator Continuous-time""
  parameter Real p = 1 ""gain for input"";
  parameter Real y1_start = 1 ""start value for first state"";
  parameter Real y2_start = 0 ""start value for second state"";
  input Real u(start = -2);
  output Real y1, y2;
initial equation
  y1 = y1_start;
  y2 = y2_start;
equation
  der(y1) = p*u;
  der(y2) = y1;
end DIC;
}}}

can be exported as FMU 2.0 with the omc commands:

{{{
    loadFile(""DIC.mo"");
    translateModelFMU(DIC, version=""2.0"");
}}}

The file modelDescription.xml contains the following ModelStructure:
{{{
  <ModelStructure>
    <Outputs>
      <Unknown index=""1"" dependenciesKind=""fixed"" />
      <Unknown index=""2"" dependenciesKind=""fixed"" />
    </Outputs>
    <Derivatives>
      <Unknown index=""3"" dependencies=""1"" dependenciesKind=""fixed"" />
      <Unknown index=""4"" dependencies=""2"" dependenciesKind=""fixed"" />
    </Derivatives>
    <InitialUnknowns>
    </InitialUnknowns>
  </ModelStructure>
}}}

The Outputs section lists dependeciesKind, but is lacking the dependencies (indices). The Derivatives section states wrong dependencies. The expected ModelStructure is:
\partial y / \partial x
\partial y / \partial u

\partial der(x) / \partial x
\partial der(x) / \partial u

{{{
  <ModelStructure>
    <Outputs>
      <Unknown index=""1"" dependencies=""1"" dependenciesKind=""fixed"" />
      <Unknown index=""2"" dependencies=""2"" dependenciesKind=""fixed"" />
    </Outputs>
    <Derivatives>
      <Unknown index=""3"" dependencies=""5"" dependenciesKind=""fixed"" />
      <Unknown index=""4"" dependencies=""1"" dependenciesKind=""fixed"" />
    </Derivatives>
    <InitialUnknowns>
    </InitialUnknowns>
  </ModelStructure>
}}}
"	defect	closed	high	1.13.0	FMI	trunk	fixed		
