﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2127	Instantiation of arrays with multiple iterators	carlj <carlj@…>	Per Östlund	"The model 

{{{
model Model1
  Real Z[2];
equation
  Z = array(i + time for i in 1:2);
end Model1;
}}}

is instantiated to

{{{
class Model1
  Real Z[1];
  Real Z[2];
equation
  Z[1] = 1.0 + time;
  Z[2] = 2.0 + time;
end Model1;
}}}

However, the model

{{{
model Model1
  Real Z[2,2];
equation
  Z = array(i + time for i in 1:2, j in 1:2);
end Model1;
}}}

is instantiated to

{{{
class Model1
  Real Z[1,1];
  Real Z[1,2];
  Real Z[2,1];
  Real Z[2,2];
equation
  Z[1,1] = array(/*Real*/(i * j) + time for j in {1, 2}, i in {1, 2})[1, 1];
  Z[1,2] = array(/*Real*/(i * j) + time for j in {1, 2}, i in {1, 2})[1, 2];
  Z[2,1] = array(/*Real*/(i * j) + time for j in {1, 2}, i in {1, 2})[2, 1];
  Z[2,2] = array(/*Real*/(i * j) + time for j in {1, 2}, i in {1, 2})[2, 2];
end Model1;
}}}

it would be nice if this model was instantiated in a similar way as the first, without referencing elements in a temporary array."	defect	closed	normal	1.16.0	New Instantiation		fixed		
