﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5655	Wrong array re-indexing in OMEdit	Andrea Bartolini	Adeel Asghar	"Consider the following (also attached) model:

{{{
model test
  Modelica.Blocks.Math.Sum sum1(nin = 2) annotation(...);
  Modelica.Blocks.Sources.RealExpression realExpression1 annotation(...);
  Modelica.Blocks.Sources.RealExpression realExpression2 annotation(...);
equation
  connect(realExpression1.y, sum1.u[1]) annotation(...);
  connect(realExpression2.y, sum1.u[2]) annotation(...);
  annotation(...);
end test;
}}} 

it works right...

Now delete the {{{realExpression2}}} from '''diagram view''', you obtain the following result:

{{{
model test
  Modelica.Blocks.Math.Sum sum1(nin = 2) annotation(...);
  Modelica.Blocks.Sources.RealExpression realExpression1 annotation(...);
equation
  connect(realExpression1.y, sum1.u[0]) annotation(...)
  annotation(...);
end test;
}}}

in which the index f the {{{sum1}}} input has been changed to 0 by OMEdit.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.14.0~dev-26758-g8730c27
sysop: Ubuntu 18.04"	defect	closed	blocker	1.14.0	OMEdit	v1.14.0-dev-nightly	fixed		Francesco Casella
