Changes between Initial Version and Version 1 of Ticket #1729


Ignore:
Timestamp:
2012-08-31T10:02:24Z (12 years ago)
Author:
Martin Sjölund
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1729

    • Property Cc zav1984, → zav1984
    • Property ComponentBackend
  • Ticket #1729 – Description

    initial v1  
    11Here the test model: 
    22
    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!   %%
     3When I redeclare the record in level two it doesnt work. Following message: Error: Error occurred while flattening model Test.TestModel
    44
    5  
     5When I do it on level three it works!
    66
    7 package RedeclareRecordTest \\
     7{{{
     8package RedeclareRecordTest
    89
    9 partial package MyPartialPackageLevelOne  \\
     10partial package MyPartialPackageLevelOne
    1011
    11   constant String level = "LevelOne";  \\
     12  constant String level = "LevelOne";
    1213
    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;
    1417
    15   \\  replaceable partial model MyReplaceablePartialModelLevelOne  \\
     18replaceable partial model MyReplaceablePartialModelLevelOne
    1619
    17     Real variableOne; \\    Real variableTwo; \\    Real variableThree; \\    Real variableFour;  \\
     20    Real variableOne;
     21    Real variableTwo;
     22    Real variableThree;
     23    Real variableFour;
    1824
    19     MyRecord myRecord;  \\
     25    MyRecord myRecord;
    2026
    21     equation  \\
     27    equation
     28     variableThree = 3;
     29     variableFour = 4;
     30  end MyReplaceablePartialModelLevelOne;
    2231
    23      variableThree = 3; \\     variableFour = 4;  \\
     32end MyPartialPackageLevelOne;
    2433
    25   \\  end MyReplaceablePartialModelLevelOne;  \\
     34partial package MyPartialPackageLevelTwo
    2635
    27 end MyPartialPackageLevelOne; \\ \\
     36  extends MyPartialPackageLevelOne(level = "LevelTwo");
    2837
    29 partial package MyPartialPackageLevelTwo  \\
     38  redeclare record extends MyRecord
     39    Real recordVariable;
     40  end MyRecord;
    3041
    31   extends MyPartialPackageLevelOne(level = "LevelTwo");  \\
     42end MyPartialPackageLevelTwo;
    3243
    33   redeclare record extends MyRecord \\    Real recordVariable;  \\  end MyRecord;  \\
     44////finally used package
    3445
    35 end MyPartialPackageLevelTwo; \\ \\
     46package MyUsedPackage
    3647
    37 ////finally used package  \\
     48  extends MyPartialPackageLevelTwo(final level = "LevelThree");
    3849
    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;
    4059
    41   extends MyPartialPackageLevelTwo(final level = "LevelThree");  \\
     60end MyUsedPackage;
    4261
    43 /*//this works!  \\  redeclare record extends MyRecord \\    Real recordVariable;  \\  end MyRecord; \\*/ \\  redeclare model extends MyReplaceablePartialModelLevelOne  \\
     62  model TestModel
    4463
    45     equation  \\
     64  package MyPackage = MyUsedPackage;
    4665
    47      myRecord.recordVariable = variableOne;  \\
     66  MyPackage.MyReplaceablePartialModelLevelOne modelFromPackage;
    4867
    49   end MyReplaceablePartialModelLevelOne;  \\
     68  equation
    5069
    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;
    6272
    6373end TestModel;
    6474
    6575end RedeclareRecordTest;
     76}}}