﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6151	FMI model structure dependencies wrong	Andreas Heuermann	Andreas Heuermann	"The indices used to show dependencies in modelDesription.xml for FMI 2.0 are wrong. Some are wrong by one Probably, because the index of variables starts counting at `1` and the `valueReference` used for FMI starts at `0`.
But there are also variables dependent to non-exising valueReferences.

I have an example I'm not sure I'm allowed to share, but I can show the problem with some parts of the modelDescription.xml of it:

{{{
<?xml version=""1.0"" encoding=""UTF-8""?>
<fmiModelDescription
[...]
  <ModelVariables>
  [...]
  <!-- Index of variable = ""29"" -->
  <ScalarVariable
    name=""tau""
    valueReference=""28""
    causality=""output""
    >
    <Real/>
  </ScalarVariable>
  <!-- Index of variable = ""30"" -->
  <ScalarVariable
    name=""v""
    valueReference=""29""
    causality=""output""
    >
    <Real/>
  </ScalarVariable>
  [...]
  </ModelVariables>
  <ModelStructure>
    <Outputs>
      <Unknown index=""29"" dependencies=""11 32"" dependenciesKind=""dependent dependent"" />
      <Unknown index=""30"" dependencies=""32"" dependenciesKind=""dependent"" />
    </Outputs>
    <InitialUnknowns>
      <Unknown index=""29"" dependencies=""23 31 43 44 92 93 116 118"" dependenciesKind=""dependent dependent dependent dependent dependent dependent dependent dependent"" />
    [...]
    </InitialUnknowns>
  </ModelStructure>
</fmiModelDescription>
}}}

We have outputs `tau` and `v` with `valueReference=28` and `valueReference=29`.
In the ModelStrucutre Outputs those are refered to index `29` and `30`.

And the second problem is displayed by the dependencies of the initial unknown `29` (which should be 28 I guess) to valueReferences `116` `118`.
But the highest index in the modelDescription is `107`.

My guess is that those index are from variables that are not exposed to the modelDescription, e.g. some temp variables or some cse variables."	defect	closed	blocker	1.17.0	FMI	v1.17.0-dev	fixed	fmi, modelDescription, dependencies, model structure	arunkumar palanisamy
