﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5592	Issue with NF and index reduction	Francesco Casella	Per Östlund	"Please check {{{ModelicaTest.Rotational.AllComponents}}}. It runs fine with the [https://libraries.openmodelica.org/branches/master/ModelicaTest_3.2.3/files/ModelicaTest_3.2.3_ModelicaTest.Rotational.AllComponents.sim old frontend], but it fails with the [https://libraries.openmodelica.org/branches/newInst/ModelicaTest_3.2.3/files/ModelicaTest_3.2.3_ModelicaTest.Rotational.AllComponents.err NF], giving the following error:
{{{
[OMCompiler/Compiler/BackEnd/Differentiate.mo:404:3-404:155:writable] Error: Derivative of expression ""der(move.phi) = Modelica.Mechanics.Rotational.Sources.Move.position_der({sine5[1].y, sine5[2].y, sine5[3].y}, time, 1.0)"" w.r.t. ""time"" is non-existent.
[OMCompiler/build/lib/omlibrary/Modelica 3.2.3/Mechanics/Rotational.mo:6424:7-6424:30:writable]
Error: Internal error Differentiate.differentiateEquationTime failed for
der(move.phi) = Modelica.Mechanics.Rotational.Sources.Move.position_der({sine5[1].y, sine5[2].y, sine5[3].y}, time, 1.0)
Error: Internal error - IndexReduction.pantelidesIndexReduction1 failed! Use -d=bltdump to get more information.
}}}
The only relevant difference I could spot in the flattened models was that the OF gives
{{{
move.phi = Modelica.Mechanics.Rotational.Sources.Move$move.position({move.u[1], move.u[2], move.u[3]}, time);
}}}
while the NF gives
{{{
move.phi = ModelicaTest.Rotational.AllComponents.move.position(move.u, time);
}}}
One difference is that the OF expands the scalar components of the array, while the NF doesn't.

The other one is that the path of the {{{position}}} function is different. Maybe this prevents the backend from using the information provided by the {{{derivative}}} annotation (which has a relative path) to find the derivative function?
"	defect	closed	blocker	2.0.0	New Instantiation		fixed		Karim Adbdelhak Lennart Ochel Andreas Heuermann
