Opened 16 years ago
Last modified 15 years ago
#1089 closed defect (fixed)
Problem with constructing a record with array elements.
Reported by: | rruusu | Owned by: | rruusu |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | rruusu, |
Description
The model below results in flattened equations with missing subscript expressions. The model also triggers issue [ISSUE:1087].
record Orientation Real T[3, 3]; Real w[3]; end Orientation; model Test Orientation R; equation R = Orientation(T=identity(3),w= zeros(3)); end Test;
Result:
>> instantiateModel(Test) "fclass Test Real R.T[1,1]; Real R.T[1,2]; Real R.T[1,3]; Real R.T[2,1]; Real R.T[2,2]; Real R.T[2,3]; Real R.T[3,1]; Real R.T[3,2]; Real R.T[3,3]; Real R.w[1]; Real R.w[2]; Real R.w[3]; equation __TMP__0 = Orientation({{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}},{0.0,0.0,0.0}); R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.T = __TMP__0.T; R.w = __TMP__0.w; R.w = __TMP__0.w; R.w = __TMP__0.w; end Test; "
Note:
See TracTickets
for help on using tickets.
It seems like this bug has been fixed, since this model now flattens and simulates.