Changes between Initial Version and Version 1 of Ticket #1729
- Timestamp:
- 2012-08-31T10:02:24Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1729
- Property Cc zav1984, → zav1984
- Property Component → Backend
-
Ticket #1729 – Description
initial v1 1 1 Here the test model: 2 2 3 %%(color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #eeeeee; display: inline ! important; float: none) When I redeclare the record in level two it doesnt work. Following message: Error: Error occurred while flattening model Test.TestModel %% \\%%(color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: #eeeeee; display: inline ! important; float: none) When I do it on level three it works! %% 3 When I redeclare the record in level two it doesnt work. Following message: Error: Error occurred while flattening model Test.TestModel 4 4 5 5 When I do it on level three it works! 6 6 7 package RedeclareRecordTest \\ 7 {{{ 8 package RedeclareRecordTest 8 9 9 partial package MyPartialPackageLevelOne \\10 partial package MyPartialPackageLevelOne 10 11 11 constant String level = "LevelOne"; \\12 constant String level = "LevelOne"; 12 13 13 replaceable partial record MyRecord \\ //record variable to be defined a level higher \\ end MyRecord; \\ 14 replaceable partial record MyRecord 15 //record variable to be defined a level higher 16 end MyRecord; 14 17 15 \\ replaceable partial model MyReplaceablePartialModelLevelOne \\ 18 replaceable partial model MyReplaceablePartialModelLevelOne 16 19 17 Real variableOne; \\ Real variableTwo; \\ Real variableThree; \\ Real variableFour; \\ 20 Real variableOne; 21 Real variableTwo; 22 Real variableThree; 23 Real variableFour; 18 24 19 MyRecord myRecord; \\25 MyRecord myRecord; 20 26 21 equation \\ 27 equation 28 variableThree = 3; 29 variableFour = 4; 30 end MyReplaceablePartialModelLevelOne; 22 31 23 variableThree = 3; \\ variableFour = 4; \\ 32 end MyPartialPackageLevelOne; 24 33 25 \\ end MyReplaceablePartialModelLevelOne; \\ 34 partial package MyPartialPackageLevelTwo 26 35 27 end MyPartialPackageLevelOne; \\ \\ 36 extends MyPartialPackageLevelOne(level = "LevelTwo"); 28 37 29 partial package MyPartialPackageLevelTwo \\ 38 redeclare record extends MyRecord 39 Real recordVariable; 40 end MyRecord; 30 41 31 extends MyPartialPackageLevelOne(level = "LevelTwo"); \\ 42 end MyPartialPackageLevelTwo; 32 43 33 redeclare record extends MyRecord \\ Real recordVariable; \\ end MyRecord; \\ 44 ////finally used package 34 45 35 end MyPartialPackageLevelTwo; \\ \\ 46 package MyUsedPackage 36 47 37 ////finally used package \\ 48 extends MyPartialPackageLevelTwo(final level = "LevelThree"); 38 49 39 package MyUsedPackage \\ 50 /* this works! 51 redeclare record extends MyRecord 52 Real recordVariable; 53 end MyRecord; 54 */ 55 redeclare model extends MyReplaceablePartialModelLevelOne 56 equation 57 myRecord.recordVariable = variableOne; 58 end MyReplaceablePartialModelLevelOne; 40 59 41 extends MyPartialPackageLevelTwo(final level = "LevelThree"); \\ 60 end MyUsedPackage; 42 61 43 /*//this works! \\ redeclare record extends MyRecord \\ Real recordVariable; \\ end MyRecord; \\*/ \\ redeclare model extends MyReplaceablePartialModelLevelOne \\ 62 model TestModel 44 63 45 equation \\64 package MyPackage = MyUsedPackage; 46 65 47 myRecord.recordVariable = variableOne; \\66 MyPackage.MyReplaceablePartialModelLevelOne modelFromPackage; 48 67 49 e nd MyReplaceablePartialModelLevelOne; \\68 equation 50 69 51 end MyUsedPackage; \\ 52 53 \\model TestModel \\ 54 55 package MyPackage = MyUsedPackage; \\ 56 57 MyPackage.MyReplaceablePartialModelLevelOne modelFromPackage; \\ 58 59 equation \\ 60 61 modelFromPackage.variableOne =1; \\ modelFromPackage.variableTwo =2; \\ 70 modelFromPackage.variableOne =1; 71 modelFromPackage.variableTwo =2; 62 72 63 73 end TestModel; 64 74 65 75 end RedeclareRecordTest; 76 }}}