﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2287	algorithm assigning an array fails during transformation	Lennart Ochel	probably noone	"The following model fails during index reduction:
{{{#!mo
model Unnamed
  Real a[3];
algorithm
  a[1] := 1;
end Unnamed;
}}}
Error message:
{{{
Simulation failed for model: Unnamed
Error: Model is structurally singular, error found sorting equations
 1: algorithm
  a[1] := 1.0;
;
 for variables
 a[1](3), a[3](1), a[2](2)
Error: Internal error Transformation Module PFPlusExt index Reduction Method Pantelites failed!
}}}


If the model gets extended with a state the translation fails due to unreferenced variables a[2] and a[3]. This is wrong because a[2] and a[3] are referenced in the algorithm (implicit).
{{{#!mo
model Unnamed
  Real a[3];
  Real x;
equation
  der(x) = 0;
algorithm
  a[1] := 1;
end Unnamed;
}}}

Error message:
{{{
Simulation failed for model: Unnamed
[<interactive>:3:3-3:12:writable] Error: Variable a[2] is not referenced in any equation (possibly after symbolic manipulations).
}}}"	defect	new	high	Future	Backend	trunk			
