Opened 10 years ago

Closed 10 years ago

Last modified 7 years ago

#3051 closed defect (fixed)

extends and modification of attributes

Reported by: Willi Braun Owned by: Adrian Pop
Priority: high Milestone: 1.9.4
Component: Frontend Version: trunk
Keywords: Cc: Adrian Pop, Rüdiger Franke, 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 by Adrian Pop, 10 years ago

Owner: changed from somebody to Adrian Pop
Status: newaccepted

comment:2 by Willi Braun, 10 years ago

Cc: Rüdiger Franke added

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

Cc: dersh@… added

comment:4 by Francesco Casella, 10 years ago

See also #3095

comment:5 by Adrian Pop, 10 years ago

Resolution: fixed
Status: acceptedclosed

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

comment:6 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.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 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.