Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#3051 closed defect (fixed)

extends and modification of attributes

Reported by: wbraun Owned by: adrpo
Priority: high Milestone: 1.9.4
Component: Frontend Version: trunk
Keywords: Cc: adrpo, rfranke, dersh@…

Description

The following model is motivated by some Modelica.Media models, which seems to have some issue with modification of the attributes like min, max, nominal and start.
The following script

loadString("
package p
  package types
    type crazyT = Real(min=2, max=12, nominal=5, start=2.1);
  end types;
  package p1
    model A
      extends types;
    end A;
    model B
      extends A(crazyT(start=1.6));
    end B;
  end p1;
  model C
    p1.A.crazyT a;
    p1.B.crazyT b;
  equation
    der(a) = 0;
    der(b) = 0;
  end C;
end p;
");
getErrorString();
instantiateModel(p.C);
getErrorString();

outputs:

"class p.C
  Real a(min = 2.0, max = 12.0, start = 2.1, nominal = 5.0);
  Real b(min = 2.0, max = 12.0, start = 2.1, nominal = 5.0);
equation
  der(a) = 0.0;
  der(b) = 0.0;
end p.C;

As far as I see the start attribute of a and b should be different, or did I miss something?

Change History (7)

comment:1 Changed 10 years ago by adrpo

  • Owner changed from somebody to adrpo
  • Status changed from new to accepted

comment:2 Changed 10 years ago by wbraun

  • Cc rfranke added

comment:3 Changed 10 years ago by Adam Dershowitz <dersh@…>

  • Cc dersh@… added

comment:4 Changed 10 years ago by casella

See also #3095

comment:5 Changed 10 years ago by adrpo

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed in r24987. Seems that #3095 is not connected to this. I'm still looking into that one.

comment:6 Changed 9 years ago by dietmarw

  • Milestone changed from Future to pre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:7 Changed 7 years ago by sjoelund.se

  • Milestone changed from pre1.9.4 to 1.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.